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
相关推荐
callJJ4 小时前
Volta + Claude Code 在 Windows 上的路径 Bug 复盘
windows·bug
xsc-xyc9 小时前
记一次RK3568搭建NAS BUG:开发板插上 USB 移动硬盘没反应
bug
放风铃的兔子2 天前
我把 5 个 Python bug 投进 CubeSandbox 当沙盘 —— 从 envd 协议反编译到一键 RED→GREEN
bug·issue
zh_xuan2 天前
诡异Bug:输入框删除字符,却越删越多
android·bug
绘梨衣5473 天前
采集基类设计遇到的描述符bug
爬虫·python·bug
不吃鱼的羊3 天前
达芬奇工具Bug
bug
油炸自行车3 天前
【bug】Qt 6 Q_NAMESPACE 跨 DLL 链接错误:LNK2019 无法解析 staticMetaObject
数据库·c++·qt·bug·link2019·q_namespace_exp·namespaceexport
sxd20014 天前
Debian #1135514 bug引发的思考
网络·debian·bug
疏狂难除6 天前
X86-64 Assembly中printf 打印 float 和 double的bug的解决
bug·assembly
nashane7 天前
HarmonyOS 6学习:指南针“文图反向”Bug修复——从“北偏东”变“北偏西”的坐标系纠错
学习·华为·bug·harmonyos