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
相关推荐
njsgcs3 小时前
c# solidworks createline 拉伸发现有微小两点间隙 导致拉伸变成薄壁特征 改bug画了6个小时 解决结果
c#·bug·solidworks
前端达人4 小时前
第18课:实战案例二,线上紧急 Bug 修复全过程
bug
代钦塔拉4 小时前
Qt 按钮 Lambda 信号槽重复绑定、多次触发 BUG 深度剖析与终极解决方案
c++·qt·bug
lpfasd1231 天前
Win11笔记本睡眠唤醒致命bug:NUL设备丢失致Git等工具瘫痪
git·bug
隔窗听雨眠3 天前
Git二分法精准定位Bug
git·bug·git bisect
技术人生黄勇5 天前
GitNexus 把代码库变成知识图谱|审核 AI 产出更清晰,改 Bug 更精准
人工智能·bug
黑夜里的小夜莺5 天前
黑马点评登录成功后点击【我的】会跳转到登录页面 BUG 修复
java·bug
熟人看不到6 天前
解决Claude Code界面错位更新不及时-Windows
bug·vibecoding·claude code
深念Y6 天前
踩坑实录:把 Windows 默认 PowerShell 换成 7.x 到底有多坑?一条龙解决指南
windows·乱码·bug·控制台·powershell·管道·流式
油炸自行车6 天前
【Qt bug排查】Qt项目debug模式下,关闭可视化界面后,后台程序不退出,依然在打印log
bug