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
Everglowwwwww2 天前
【bug】通过lora方式微调sdxl inpainting踩坑
学习·计算机视觉·ai作画·stable diffusion·bug
数据最前线2 天前
创建索引遇到这个Bug,19c中还没有修复
oracle·bug
CV金科2 天前
蓝桥杯-STM32G431RBT6(UART解析字符串sscanf和解决串口BUG)
c语言·stm32·单片机·嵌入式硬件·mcu·算法·bug
DisonTangor2 天前
网传阿里云盘出现bug,可看到其他用户云盘图片
阿里云·bug
后端小张2 天前
System.out源码解读——err 和 out 一起用导致的顺序异常Bug
java·开发语言·jdk·bug
我又来搬代码了2 天前
【Android】【Bug】Activity全屏(保留底部按钮)被打断变成非全屏了
android·bug
__water3 天前
『功能项目』调整Boss技能bug【51】
c#·bug·unity引擎
johnny2333 天前
《Effective Debugging:软件和系统调试的66个有效方法》读书笔记-Part2
bug
曲大家4 天前
Java和西门子S7-1200通讯调试记录
bug