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
相关推荐
向上的车轮1 小时前
软件世界中的超级bug有哪些?
bug
测试小小怪下士2 天前
Bug的严重等级和优先级别与分类
bug
测试小小怪下士2 天前
软件Bug和缺陷的区别是什么?
bug
Matrix704 天前
Spark_写ORALCE:ORA-01426 numeric overflow 问题解决
bug
明耀6 天前
WPF Gif图谱 如果隐藏的话会存在BUG
c#·bug·wpf
|Ringleader|6 天前
【Unity Bug 随记】unity version control 报 xx is not in a workspace.
unity·bug·版本管理·uvc
a1111111111ss7 天前
猫狗识别之BUG汇总
bug
晓同哇哇~7 天前
Wxml2Canvas小程序将dom转为图片,bug总结
bug·canva可画
小波波啊7 天前
idea远程debug调试
ide·bug·intellij-idea
冷小鱼7 天前
【BUG】Error: llama runner process has terminated: exit status 127
bug·llama·ollama