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
相关推荐
康同学游戏坊13 小时前
独立游戏周报|装备和技能模块推进,一边测试一边修Bug
游戏·bug
zhoulcc1 天前
前端响应处理:AjaxResult与TableDataInfo的JSON结构区别及统一取值方案
前端·后端·bug·ajaxresult·tabledatainfo
一切皆有可能!!4 天前
【SoduWork测评】本机跑源码,找到并修了7个Bug
windows·开源·bug·ai编程·soduwork
2601_967987378 天前
程序员遇到BUG的解释
程序员·bug·软件开发·调试·幽默
jianqiang.xue8 天前
线程一切换浮点全作废:五天修好的隐秘bug
bug
寂寞的船11 天前
【Unity Bug挑战】第12期 Awaitable 二次 await 死锁之谜 —— 为什么同一个异步操作等两次就卡死?
unity·c#·游戏引擎·bug
海拥✘13 天前
让 AI 修 AI 平台自己的 Bug:我用 SoduWork 给 SoduWork 提了一个 PR
人工智能·bug
Risehuxyc15 天前
fix bug
bug
拖累斯18 天前
Jenkins + Python 全自动跑通「禅道任务/BUG 导出 → 月度开发考核表」
python·jenkins·bug
寂寞的船18 天前
【Unity Bug挑战】第10期 SerializeReference 内存泄漏之谜
unity·c#·游戏引擎·bug