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
相关推荐
%d%d22 天前
undefined reference to CPUAllocatorSingleton::instance
bug
gxn_mmf4 天前
典籍知识问答重新生成和消息修改Bug修改
前端·bug
千里马学框架5 天前
重学安卓14/15自由窗口freeform企业实战bug-学员作业
android·framework·bug·systrace·安卓framework开发·安卓窗口系统·自由窗口
Bear on Toilet6 天前
Bug日记——实现“日期类”
开发语言·c++·bug
Direction_Wind6 天前
flinksql bug : Max aggregate function does not support type: CHAR
bug
mg6686 天前
Python Bug 修复案例分析:多线程数据竞争引发的bug 两种修复方法
bug
黎猫大侠7 天前
一次Android Fragment内存泄露的bug解决记录|Fragment not attach to an Activity
android·bug
七七小报7 天前
uniapp-商城-48-后台 分类数据添加修改弹窗bug
uni-app·bug
windwind20007 天前
发行基础:本地化BUG导致审核失败
游戏·青少年编程·编辑器·bug·创业创新·玩游戏
Htht1117 天前
【Qt】之【Bug】点击按钮(ui->pushButton)触发非本类设置的槽函数
qt·ui·bug