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
相关推荐
无人等人1 天前
CyberRT(apollo) IPC(shm)通信包重复/丢包 bug 及解决方案
c++·bug
Urf_read1 天前
改BUG:Mock测试的时候,when失效
bug
賢8431 天前
如何保证bug在改完之后不会引起新bug
bug
永康李2 天前
Pandas:从一个DataFrame中直接索引赋值到另一个索引位置出错的Bug及其解决方案
python·bug·pandas
NPE~2 天前
Bug:Goland debug失效详细解决步骤【合集】
go·bug·goland·dlv失效
Urf_read3 天前
改BUG:远程连接redis失败,可能是防火墙的问题
java·redis·python·bug
Tlog嵌入式5 天前
单片机常见bug记录(长期更新)
单片机·嵌入式硬件·bug
会发光的猪。6 天前
el-input无法输入0.0001的小数,自动转换为0在vue3中的bug
前端·javascript·vue.js·elementui·bug
shandianchengzi6 天前
【BUG】LLM|Ubuntu 用 ollama 部署 DeepSeek 但没输出,llama 有输出
ubuntu·llm·bug·llama·ollama·deepseek
抽象具象化6 天前
Bug日记:Linux中systemctl restart network失败问题,网络故障
linux·运维·bug