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'.

原始代码:

>>> transcriber.model.config.forced_decoder_ids = (
...   transcriber.tokenizer.get_decoder_prompt_ids(
...     language="zh",
...     task="transcribe"
...   )
... )

解决方法:上述代码修改为如下代码。

>>> transcriber.model.config.language="zh"
>>> transcriber.model.config.task="transcribe"
>>> transcriber.model.config.forced_decoder_ids=None

最近更新

  1. TCP协议是安全的吗?

    2024-06-06 10:48:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-06 10:48:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-06 10:48:01       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-06 10:48:01       20 阅读

热门阅读

  1. 055、Python 关于全局变量和局部变量

    2024-06-06 10:48:01       10 阅读
  2. 【无标题】

    2024-06-06 10:48:01       8 阅读
  3. 数据结构与算法-16_ 哈希表

    2024-06-06 10:48:01       7 阅读
  4. 爬山算法介绍

    2024-06-06 10:48:01       10 阅读
  5. python-01

    python-01

    2024-06-06 10:48:01      7 阅读
  6. 2024.05.21 校招 实习 内推 面经

    2024-06-06 10:48:01       9 阅读
  7. expect自动化交互应用程序工具

    2024-06-06 10:48:01       6 阅读
  8. 比特币的理论上限是多少个?

    2024-06-06 10:48:01       7 阅读
  9. SCSS 和 Sass的区别?

    2024-06-06 10:48:01       8 阅读
  10. Linux中网络配置项目笔记

    2024-06-06 10:48:01       8 阅读
  11. CSPM.pdf

    CSPM.pdf

    2024-06-06 10:48:01      8 阅读
  12. 微信小程序 数据请求

    2024-06-06 10:48:01       7 阅读