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
相关推荐
万粉变现经纪人21 小时前
如何解决 pip install tensorflow-gpu 报错 未检测到 CUDA 驱动 问题
人工智能·python·深度学习·aigc·tensorflow·bug·pip
初圣魔门首席弟子1 天前
boost配置遇到的bug
bug
万粉变现经纪人2 天前
如何解决 pip install ta-lib 报错 本地 TA-Lib 库未安装 问题
数据库·python·scrapy·oracle·bug·pandas·pip
Cc_Debugger2 天前
【饿了么plus-table】开启多选时,点击下面的单选按钮,页面显示是全选的样子,bug
bug
龙卷风卷云2 天前
【BUG】Nginx使用upstream后端接口报 400
运维·nginx·bug
jiayi_19994 天前
[bug] unsupported GNU version! gcc versions later than 12 are not supported!
服务器·bug·gnu
管二狗赶快去工作!5 天前
体系结构论文(九十三):LLM-Aided Compilation for Tensor Accelerators
人工智能·语言模型·自然语言处理·bug·体系结构
查古穆5 天前
LLM的“小bug”:聊聊幻觉是什么,以及如何有效规避免
人工智能·bug
程序员 沐阳5 天前
Git 二分法精准定位 Bug:从原理到实战,让调试效率起飞
git·elasticsearch·bug
软泡芙5 天前
【Bug】ReactiveUI WPF绑定中依赖属性不更新的问题分析与解决方案
java·bug·wpf