#8138 anche in pyvideotrans 4.16 le frasi sono troppo lunghe

79.22**1 Posted at: 1 hour ago

anche in pyvideotrans 4.16 le frasi sono troppo lunghe

5 Replies

#1 DeepSeek reply at 1 hour ago

句子过长通常是因为语音识别(ASR)参数默认将较长的连续语音合并为一条字幕。要强制生成更短、更碎的字幕,请调整分段参数。

操作步骤

  1. 打开 菜单 -> 工具/选项 -> 高级选项 -> 语音识别参数(ASR Settings)
  2. 修改以下参数:

    • 最长语音持续(VAD:max speech duration(s)):默认 5,请改为 2 或 3 秒。这是单条字幕时长的“上限”。
    • 静音分割持续(VAD:Min silence duration for split(ms)):默认 600,请改为 200 或 300 毫秒。停顿只要超过此值就会被切分为新字幕,使切分更频繁。
    • 最短语音持续(VAD:min speech duration(ms)):默认 3000,若降低“最长语音持续”,请同步将此值调低,例如 1000 毫秒,避免过短片段被强行合并。
  3. ⚠️ 注意:最长语音持续(秒) × 1000 必须严格大于 最短语音持续(毫秒),否则参数冲突会导致识别混乱。

推荐设置(用于短字幕)

  • 最长语音持续:2 或 3
  • 最短语音持续:1000
  • 静音分割持续:300

如果你的问题是 嵌入画面中的字幕行本身过长(例如中文字幕每行字数太多),还可以调整:

  • 高级选项 -> 字幕声音画面对齐 -> 中日韩字幕单行字符数(默认约 10)
  • 高级选项 -> 字幕声音画面对齐 -> 其他语言字幕单行字符数(默认约 20)

请查阅相关文档:

#2 79.22**1 reply at 1 hour ago

inseriti ma sembra che il programma non li prenda in considerazione

#3 DeepSeek reply at 1 hour ago

若已修改 高级选项 中的 VAD 参数但新任务仍生成过长字幕,请按以下顺序排查:

  1. 确认保存并重启软件
    高级选项 修改后需点击窗口底部的保存按钮,并完全退出并重启 pyVideoTrans,确保配置写入 cfg.json 并重新加载。
  2. 检查是否误改了二次识别参数
    语音识别参数 区域有两组相似参数:

    • 最长语音持续(VAD:max speech duration(s)) 等 → 用于第一次语音识别
    • 二次识别最长语音持续(Recognition(2): max speech duration(s)) 等 → 仅当勾选“二次识别”时才会使用
      请确认你修改的是第一组,而不是 Recognition(2) 开头的第二组。
  3. 清除已生成的缓存文件
    如果对同一个视频重试,旧字幕可能被缓存复用,导致新参数未生效。处理前勾选主界面上的 清理已生成(Clear Output),或手动删除 _video_out 中该视频对应文件夹下的旧字幕文件和缓存。
  4. 检查是否使用了“自动检测”发音语言
    若在 发音语言 中选择了 自动检测,某些识别渠道可能会忽略自定义 VAD 分段逻辑。建议明确指定发音语言。
  5. 确认修改的是实际生效的配置文件
    若使用了多个软件副本或绿色版,请确认你运行的是修改配置的那个目录下的 sp.exe。配置文件保存在 软件目录/videotrans/ 下(params.json、cfg.json)。
  6. 若仍无效,请提供日志
    打开软件目录下的 logs/ 文件夹,复制最新日志文件底部约30行报错或提示信息,以便进一步定位原因。

请查阅相关文档:

#4 79.22**1 reply at 1 hour ago

whisper.audio)r i·Œ‘iJ
)úwhisper.decoding)r i—‘i:, )ú
whisper.model)r i;ÑiÛ )úwhisper.timing)r iÚ‘i£ )úwhisper.tokenizer)r i¹î‘i  )úwhisper.transcribe)r iÅ ’i¨% )úwhisper.triton_ops)r im-’i… )ú
whisper.utils)r iò4’ic )úwhisper.version)r iUH’rˆ ) che roba è

#5 DeepSeek reply at 1 hour ago

Questa è una traccia di errore (stack trace) o un dump di memoria generato durante il caricamento o l'esecuzione del modulo openai-whisper (o di un componente Whisper). Il testo contiene i nomi dei moduli interni (whisper.audio, whisper.model, whisper.transcribe, ecc.) ed è visibilmente corrotto/illegibile. Nella maggior parte dei casi indica che il modello Whisper non è stato caricato correttamente (file mancante, scaricato in modo incompleto o danneggiato) oppure c'è un conflitto tra versioni delle librerie.

Cosa fare

  1. Passa al canale faster-whisper(内置) nella voce "语音识别 (STT Service)" se stai usando openai-whisper(内置). È il canale predefinito consigliato e più stabile.
  2. Se devi usare openai-whisper, elimina i file modello .pt presenti in 软件目录/models/ (es. large-v3.pt, turbo.pt). Poi riavvia il software per forzare un nuovo download completo.
  3. Se stai già usando faster-whisper, elimina le cartelle modello corrispondenti, ad esempio:

    • 软件目录/models/models--Systran--faster-whisper-*
    • oppure 软件目录/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo
      Poi riavvia e lascia che il modello venga scaricato di nuovo.
  4. Verifica il percorso di installazione: deve essere semplice e senza spazi o caratteri speciali (es. D:\pyVideoTrans). Evita cartelle come C:\Program Files.
  5. Se l'errore persiste, fornisci il contenuto dell'ultimo file di log (ultime ~30 righe) dalla cartella logs/ del software.

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource