Skip to content

How to combine timestamp prediction model in ASR pipeline? #246

Answered by R1ckShi
R1ckShi asked this question in Q&A
Discussion options

You must be logged in to vote

For ASR model like uniasr or conformer, the inference pipelines do not support conduct timestamp prediction inside, you can use timestamp prediction pipeline outside the asr pipeline like:

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',
    )
inference_pipeline_tp = pipeline(
    task=Tasks.speech_timestamp,
    model='damo/speech_timestamp_prediction-v1-16k-offline',
    model_revision='v1.1.0',
    output_dir='./tmp')

rec_result_asr = inference_pipeline(audio_in="/Users/shixian/code/export/damo…

Replies: 1 comment

Comment options

R1ckShi
Mar 28, 2023
Maintainer Author

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