-
|
You could combine the The pipeline which only contains from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
)The pipeline which contains inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
lm_model='damo/speech_transformer_lm_zh-cn-common-vocab8404-pytorch',
lm_weight=0.15,
beam_size=10,
)The pipeline which contains inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
vad_model='damo/speech_fsmn_vad_zh-cn-16k-common-pytorch',
)The pipeline which contains inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
vad_model='damo/speech_fsmn_vad_zh-cn-16k-common-pytorch',
punc_model='damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch',
)The pipeline which contains inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
vad_model='damo/speech_fsmn_vad_zh-cn-16k-common-pytorch',
punc_model='damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch',
lm_model='damo/speech_transformer_lm_zh-cn-common-vocab8404-pytorch',
lm_weight=0.15,
beam_size=10,
) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
|
Notes: For the Paraformer-large-long, the pipeline defaults to combine from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
)It equals to inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
vad_model='damo/speech_fsmn_vad_zh-cn-16k-common-pytorch',
punc_model='damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch',
)If you want to disable the inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
punc_model='',
) |
Beta Was this translation helpful? Give feedback.
-
|
对于读取本地模型,如 |
Beta Was this translation helpful? Give feedback.
-
|
长达7分钟的干净语音文件,使用: inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
vad_model='damo/speech_fsmn_vad_zh-cn-16k-common-pytorch',
punc_model='damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch',
)没有输出time_stamp,这是为什么呢?sentences的输出也是空的。我希望得到时间戳和对应的文本内容(带有标点符号),谢谢。 |
Beta Was this translation helpful? Give feedback.
-
|
Update for current FunASR 1.3.x: the 2023 Current VAD + ASR + punctuation pipelineModel IDs and complete local directories are both supported. When using local models, each argument must point to its own complete model directory containing from funasr import AutoModel
model = AutoModel(
model="/models/paraformer-zh",
vad_model="/models/fsmn-vad",
punc_model="/models/ct-punc",
device="cpu",
disable_update=True,
)
result = model.generate(
input="/audio/example.wav",
batch_size_s=300,
return_raw_text=True,
sentence_timestamp=True,
)[0]
print(result["text"])
print(result["timestamp"])
print(result["sentence_info"])The current I verified this with FunASR 1.3.14 / PyTorch 2.11 on CPU while all network proxies pointed to an unavailable local port. The main ASR, VAD, and punctuation Timestamp field namesThe current output field is
Sentence segmentation needs NNLM / language-model decodingDo not copy the old If you need language-model decoding today, use the C++/ONNX 2-pass runtime, which documents an N-gram WFST model through The current non-streaming Python example is also maintained in the FunASR tutorial. |
Beta Was this translation helpful? Give feedback.
Update for current FunASR 1.3.x: the 2023
modelscope.pipeline(...)examples above describe the legacy API. For the current Python pipeline, usefunasr.AutoModel.Current VAD + ASR + punctuation pipeline
Model IDs and complete local directories are both supported. When using local models, each argument must point to its own complete model directory containing
config.yaml,model.pt, and the associated tokenizer/frontend files: