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 天前
软件测试—从认识到BUG
考研·安全·bug
hulihutu443 天前
拒绝延期、bug、货不对板:2026 管理系统定制开发落地保障手册
github·bug·鸿蒙系统·数据库管理员
Rain5093 天前
谁动了我的 URL?——记一次微前端“灵异 Bug“的排查实录
前端·vue.js·人工智能·前端框架·bug·ai编程
百变梦仔3 天前
Codex 处理接口异常类 bug 时,我会让调试 Skill 先接住错误信息
bug
深念Y5 天前
fnOS-k3s-ResolvConf权限700-Bug分析
内核·bug·nas·k3s·fnos·魔改内核
不正经学生5 天前
C语言预处理详解:编译器真正动手之前的那些事
c语言·开发语言·算法·面试·bug
Capricorn19886 天前
Bug排障实录:Software 3.0 遭遇文献幻觉?知芽 Notebook Skill 底层架构解析
人工智能·笔记·架构·bug·论文笔记
项目管理与代码6 天前
Bug跟踪管理系统对比:从提报效率、流转体验与数据分析能力三个维度评估
bug·项目管理·bug跟踪
福大大架构师每日一题8 天前
RAGFlow v0.27.1 发布:新增 Azure DevOps、You.com 搜索,修复海量 Bug,性能大幅提升!
bug·azure·devops
树码小子8 天前
测试(6) - bug篇(上)
软件测试·bug