Due to a bug fix in https://github.com/huggingface/transformers/pull/28687

错误:

Due to a bug fix in https://github.com/huggingface/transformers/pull/28687 transcription using a multilingual Whisper will default to language detection followed by transcription instead of translation to English.This might be a breaking change for your use case. If you want to instead always translate your audio to English, make sure to pass language='en'.

原始代码:

bash 复制代码
>>> transcriber.model.config.forced_decoder_ids = (
...   transcriber.tokenizer.get_decoder_prompt_ids(
...     language="zh",
...     task="transcribe"
...   )
... )

解决方法:上述代码修改为如下代码。

bash 复制代码
>>> transcriber.model.config.language="zh"
>>> transcriber.model.config.task="transcribe"
>>> transcriber.model.config.forced_decoder_ids=None
相关推荐
2601_967987371 天前
程序员遇到BUG的解释
程序员·bug·软件开发·调试·幽默
jianqiang.xue1 天前
线程一切换浮点全作废:五天修好的隐秘bug
bug
寂寞的船4 天前
【Unity Bug挑战】第12期 Awaitable 二次 await 死锁之谜 —— 为什么同一个异步操作等两次就卡死?
unity·c#·游戏引擎·bug
海拥✘6 天前
让 AI 修 AI 平台自己的 Bug:我用 SoduWork 给 SoduWork 提了一个 PR
人工智能·bug
Risehuxyc8 天前
fix bug
bug
拖累斯11 天前
Jenkins + Python 全自动跑通「禅道任务/BUG 导出 → 月度开发考核表」
python·jenkins·bug
寂寞的船11 天前
【Unity Bug挑战】第10期 SerializeReference 内存泄漏之谜
unity·c#·游戏引擎·bug
unity工具人11 天前
unity 照片墙插件(Pop-up Photo Wall)在触摸屏和红外框设备上的触发Bug
bug
灼行14 天前
Autosar SecOC 需求场景BUG(需求不一致性)【草稿】
bug
小豆庄16 天前
视频遮罩追踪退场后ID撞号的排查—多目标场景下的失效
opencv·算法·bug·视频·python3.11