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
相关推荐
朝新_11 小时前
【无标题】软件测试bug篇
bug
e***98571 天前
Bug侦破大会:破解技术悬案的终极策略
bug
缘友一世1 天前
精粤X99-TI D4 PLUS大板使用多显卡BIOS设置
bug·gpu·硬件·主板·x99
月明长歌1 天前
测试BUG 篇:从“怎么测”到“怎么提”,再到“怎么关”全流程
软件测试·测试开发·bug
初圣魔门首席弟子2 天前
Qt自定义控件bug记录
bug
l1t3 天前
duckdb数据库CROSS JOIN LATERAL 中使用 EXISTS子查询的一个bug
数据库·bug
Zsh-cs3 天前
苍穹外卖day11销量TOP10商品展示,前端有商品名字但无销量(已解决)
bug
数字芯片实验室4 天前
仿真器出bug了?分频时钟竞争的诡异仿真现象
fpga开发·bug
Zsh-cs5 天前
苍穹外卖day9前端订单分页查询后订单菜品不展示(已解决)
bug
北数云5 天前
北数云内测|AI 需求发布区 + Bug/建议长期征
bug·模型·智能体