Skip to content
Discussion options

You must be logged in to vote

这里主要混淆了 VAD 切段切段后的动态 batching

  • max_single_segment_time:VAD 允许的单个语音片段最大时长,单位毫秒;这是三者中真正控制“最长切段”的参数。
  • batch_size_s:VAD 切完后,一个动态 batch 的总音频时长预算,单位秒;它不会再切音频。
  • batch_size_threshold_s:某个 VAD 片段超过该阈值时,让它单独组成一个 batch,单位秒;它同样不会把片段截短。

当前实现也是按这个顺序执行:先得到 VAD 片段,再依据后两个参数组织 batch(源码batch 逻辑)。

你现在的 max_single_segment_time=60000 允许连续语音以最长 60 秒的片段送进 Paraformer;而文档说明模型输入通常应控制在 30 秒以内(参数说明)。这与“18 分钟文件异常、截出的短片正常”的现象吻合。建议先把最长 VAD 片段降到 30 秒;连续讲话很多时可进一步试 15–20 秒。

另外,rich_transcription_postprocess 是处理 SenseVoice 语言/情感/事件标签的后处理,当前 README 也只在 SenseVoiceSmall 示例中使用(示例)。Paraformer 的普通文本应直接读取 res[0]["text"]。你贴出的 __main__ 调用还少传了必需的 hotword 参数,下面顺便给它一个默认值:

from funasr import AutoModel

model = AutoModel(
    model="…

Replies: 1 comment

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