Skip to content
Discussion options

You must be logged in to vote

问题已经定位:初始化代码把 vad_model 误写成了 vda_modelfunasr==1.3.30 只读取 vad_model;误拼写会让 VAD 模型没有创建,随后不会进入长音频分段、说话人后处理和 sentence_info 组装。

请改为:

model_kwargs["vad_model"] = self.vda_model_path

results = model.generate(
    input=self._audio_buffer,
    sentence_timestamp=True,
    return_spk_res=True,
)

也可以先检查:

print(model.vad_model is not None)
print(results[0].keys())

这里第一项应为 True,结果中才会出现 sentence_info。另外,当前实现不断累积缓冲并重复跑离线整段识别,并不是真正的流式推理;如果后续遇到延迟问题,应改用 online VAD 或 WebSocket streaming。

为避免其他用户再次被这个拼写静默坑到,main 已通过 #3443 加入明确报错:传入 vda_model 时会直接提示改用 vad_model。该修复会进入下一正式版 1.4.0

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@LauraGPT
Comment options

@QK-123
Comment options

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
2 participants