Skip to content
Discussion options

You must be logged in to vote

The decoding_model parameter in the original example is correct, but that example belongs to the legacy ModelScope/FunASR stack used by this 2023 model card.

Choose one mode when constructing the pipeline:

from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

mode = "normal"  # "fast", "normal", or "offline"

inference_pipeline = pipeline(
    task=Tasks.auto_speech_recognition,
    model="damo/speech_UniASR_asr_2pass-minnan-16k-common-vocab3825",
    param_dict={"decoding_model": mode},
)

result = inference_pipeline(audio_in="asr_example.wav")
print(result)

Create a new pipeline if you need to change the mode. The decoder/beam-search state is initialized…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by LauraGPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants