在 google colab 上运行时未找到 Deepspeech 模块

问题描述 投票:0回答:1

我需要将 Deepspeech 0.6.1 安装到我的系统中以进行自动语音识别项目。因此,根据我导师的指导,我使用了所有这些代码

[ !pip 安装 deepspeech==0.6.1 !apt-get install -qq sox 导入深度语音

错误:ModuleNotFoundError Traceback(最近一次调用最后一次) 在 () 中 ----> 1 导入深度语音

ModuleNotFoundError:没有名为“deepspeech”的模块]

在 Google Collab 上,但是当我运行“导入深度语音”代码时,它说找不到模块。

我接下来在前辈的指导下尝试了这些代码。 [ !点列表 | grep 深度语音 它显示:deepspeech 0.6.1]

所以 Deepspeech 存在,但仍然“导入 deepspeech”不起作用

我也尝试过其他 Deepspeech 版本,例如 0.9.3 版本,但同样的问题仍然存在

我是 python 和 Google Collab 的新手。请帮忙!

python pip speech-to-text
1个回答
0
投票

我自己尝试在 Google Colab 上安装

deepspeech
。这是
!pip install deepspeech
的输出:

ERROR: Could not find a version that satisfies the requirement deepspeech (from versions: none)
ERROR: No matching distribution found for deepspeech

由于Google colab上安装的python版本是3.10,看起来python 3.10没有可用的deepspeech Wheel。 这里也提到了:

https://github.com/mozilla/DeepSpeech/issues/3694

所以你有两个选择:

  1. 将Google Colab的python从3.10降级到3.9或更低版本https://stackoverflow.com/a/71511943

  2. 使用较新的语音转文本库,例如 https://github.com/openai/whisperhttps://github.com/coqui-ai/stt

© www.soinside.com 2019 - 2024. All rights reserved.