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
相关推荐
阿部多瑞 ABU14 小时前
《智能学号抽取系统》V5.9.5 发布:精简代码,修复移动端文件读取核心 Bug
vue·html·bug
qq_4523962320 小时前
【工程实战】第八篇:报告美学 —— Allure 深度定制:让 Bug 定位精准到秒
开发语言·python·bug
tkokof12 天前
捉虫(Bug)小记
人工智能·深度学习·bug·游戏开发
南宫萧幕2 天前
基于上一篇文章VMware+openweb UI+ollama+docker的bug问题总结
docker·容器·bug·openweb ui
呼啦啦5612 天前
测试(BUG篇)
bug
ZC跨境爬虫2 天前
3D地球卫星轨道可视化平台开发Day2(轨道错位Bug修复+模块化结构优化)
前端·3d·html·json·bug
柠檬07112 天前
记录bug :C++调用python 路径问题
c++·python·bug
初圣魔门首席弟子4 天前
bug20260415
c++·bug
万粉变现经纪人4 天前
如何解决 pip install flash-attention 报错 需要 SM_80+(Ampere)架构 问题
python·架构·django·bug·virtualenv·pip·pygame
zhanglianzhao5 天前
Gazebo仿真机器人和相机时Gazebo ROS Control 插件偶发性加载失败bug分析
机器人·bug·ros·gazebo·ros_control