Aligning an existing transcript #2971
Answered
by
LauraGPT
samuelbradshaw
asked this question in
Q&A
|
Does this library provide a way to align an existing transcript to an audio recording? |
Answered by
LauraGPT
Jul 14, 2026
Replies: 1 comment
|
Yes. For an existing transcript, use FunASR's fa-zh forced-alignment model: from funasr import AutoModel
model = AutoModel(model="fa-zh")
result = model.generate(
input=("audio.wav", "transcript.txt"),
data_type=("sound", "text"),
)
print(result)The second input is the transcript to align, and the result contains the predicted token/character timing. The transcript should correspond closely to the spoken audio; large insertions, omissions, or a different language/model domain can reduce alignment quality. fa-zh maps to iic/speech_timestamp_prediction-v1-16k-offline. It is the dedicated Chinese timestamp/forced-alignment path, not a generic multilingual aligner. Fun-ASR-Nano's own CTC timestamp stage aligns its decoded output and is a different workflow. Official example: Timestamp Prediction. |
0 replies
Answer selected by
LauraGPT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes. For an existing transcript, use FunASR's fa-zh forced-alignment model:
The second input is the transcript to align, and the result contains the predicted token/character timing. The transcript should correspond closely to the spoken audio; large insertions, omissions, or a different language/model domain can reduce alignment quality.
fa-zh maps to iic/speech_timestamp_prediction-v1-16k-offline. It is the dedicated Chinese timestamp/forced-alignment path, not a generic multilingual aligner. Fun-ASR-Nano's o…