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
相关推荐
cat2bug1 天前
介绍一下Cat2Bug-App如何连接自己的Bug平台
bug
秋天枫叶351 天前
【k8s集群Docker + cri-dockerd】服务器重启或关机后 apiserver/controller/scheduler 无法自动恢复
linux·运维·服务器·容器·kubernetes·bug
小趴菜不能喝2 天前
若依Plus 的XSSFilter 的bug
bug
朝新_4 天前
【无标题】软件测试bug篇
bug
e***98574 天前
Bug侦破大会:破解技术悬案的终极策略
bug
缘友一世4 天前
精粤X99-TI D4 PLUS大板使用多显卡BIOS设置
bug·gpu·硬件·主板·x99
月明长歌4 天前
测试BUG 篇:从“怎么测”到“怎么提”,再到“怎么关”全流程
软件测试·测试开发·bug
初圣魔门首席弟子5 天前
Qt自定义控件bug记录
bug
l1t6 天前
duckdb数据库CROSS JOIN LATERAL 中使用 EXISTS子查询的一个bug
数据库·bug
Zsh-cs6 天前
苍穹外卖day11销量TOP10商品展示,前端有商品名字但无销量(已解决)
bug