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
相关推荐
waves浪游4 小时前
自动化测试实战篇
测试用例·bug·测试
DarkAthena1 天前
【ORACLE】记录一些ORACLE的merge into语句的BUG
数据库·oracle·bug
猫猫头有亿点炸1 天前
大数据可能出现的bug之flume
大数据·bug·flume
PLUS_WAVE1 天前
【CUDA 编译 bug】ld: cannot find -lcudart
服务器·c++·bug·环境·编译·cuda·ld
宁酱醇2 天前
各种各样的bug合集
开发语言·笔记·python·gitlab·bug
有什么东东2 天前
山东大学软件学院创新项目实训开发日志(20)之中医知识问答自动生成对话标题bug修改
java·vue·bug·springboot
软件技术NINI2 天前
详解BUG(又名:BUG的生命周期)
bug
兮动人2 天前
Idea使用github copilot登录bug+解决方案
github·bug·intellij-idea
Macle_Chen2 天前
ios开发中xxx.debug.dylib not found
ios·bug·debug.dylib
福大大架构师每日一题2 天前
docker v28.1.1 正式发布!修复关键Bug,网络与安全性再升级
网络·docker·bug