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
相关推荐
不懂的浪漫2 小时前
Codex 更新后历史 Session 消失?我写了一个修复官方 Bug 的 Recovery Skill
bug·codex·skill
এ慕ོ冬℘゜4 小时前
手写一款高兼容、零BUG图片预览组件|前端
前端·bug
hui函数1 天前
Python系列Bug修复|如何解决 pip install 报错 ModuleNotFoundError: No module named ‘pygame’ 问题
python·bug·pip
初圣魔门首席弟子1 天前
BUG-001: 相对导入超出顶级包范围导致程序启动失败
bug
bbaydnog1 天前
FreeRTOS学习笔记 17:资源管理与临界区保护——优先级反转、死锁,90%的RTOS bug都跟它有关
笔记·学习·bug
lili00122 天前
Claude自动修Bug配置优化与避坑指南
java·人工智能·python·bug·ai编程
小陶来咯3 天前
agent × 豆包:端到端语音实时交互
网络·ai·机器人·bug·交互
鬼才血脉4 天前
Idea使用Tomact运行项目,控制台输出中文乱码
tomcat·bug
NiceCloud喜云4 天前
Anthropic 发布 Project Glasswing:未公开模型 Mythos 已挖出 10000+ 漏洞,含 OpenBSD 27 年老 bug
android·java·数据库·c++·python·docker·bug
xufengzhu5 天前
臻识摄像头黑屏Bug 处理
bug·图像识别·摄像头