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
相关推荐
黑猫学长呀15 小时前
【驱动开发常见问题】编译出现rm: cannot remove `asm/arch‘: Is a directory
驱动开发·单片机·嵌入式硬件·bug·编译报错·kernrl
姚青&1 天前
测试流程搭建
测试用例·bug·jira
mmsx2 天前
return false 不是拦截:一次按键触发两个动作的事件冒泡陷阱
android·bug
随风丶飘2 天前
[特殊字符] 告别“update“和“fix bug“——Smart Git Commit LLM 让 AI 帮你写专业的 Git 提交信息
人工智能·git·bug
czhc11400756632 天前
崩溃复查与“回声“bug:异常码判案、漏网之鱼和耳塞开关
bug
mmsx4 天前
我明明调用了 zoomToBounds,地图却总是停在别处?延迟加到 5 秒也没用,真相只有一个
android·人工智能·bug·地图
mmsx4 天前
置灰按钮为什么自己又“亮“了?一次状态缓存“双写冲突“的排查记录
java·缓存·bug·livedata
MartinYeung55 天前
[bug 分析] Orchard 伪造漏洞: 深度代码剖析
安全·区块链·bug
为你奋斗!5 天前
禅道Bug导出CSV文件批量转Word+图片离线部署操作手册
word·bug
隔窗听雨眠7 天前
Library Cache Lock性能故障深度解析:JDBC驱动Bug、绑定变量长度与游标激增的连环效应
bug·library