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
相关推荐
月小满3 小时前
DataV轮播时其他组件的内容也一起滚动 修复bug的方法
前端·vue.js·bug·大屏端
桃子丫4 小时前
AD转 Cadence学习指南-BUG篇
bug
testtraveler5 小时前
[Fix] ImportError: libtorch_cpu.so: undefined symbol: iJIT_NotifyEvent
pytorch·python·bug
测试者家园13 小时前
从“找 bug”到“降风险”:测试思维模式的底层迁移
软件测试·bug·风险管理·持续测试·测试基础·智能化测试·测试思维模式
chde2Wang20 小时前
运行scala文件报错xsbt.CompilerInterface
bug·scala
离离茶2 天前
【笔记1-8】Qt bug记录:QListWidget窗口的浏览模式切换为ListMode后,滚轮滚动速度变慢
笔记·qt·bug
程序猿阿伟2 天前
《从被动修复到免疫:游戏Bug闭环体系的深度搭建指南》
游戏·bug
Cola可洛5 天前
修复Flyme移植BUG
android·bug
Bear on Toilet5 天前
C++_Bug:现代写法拷贝构造中 swap 写法之小坑
数据结构·c++·bug
aduzhe5 天前
关于在嵌入式中打印float类型遇到的bug
前端·javascript·bug