#1178 ModuleNotFoundError: No module named 'deepgram'

106.39* Posted at: 5 days ago 👁28

Traceback (most recent call last):
File "/Users/mac/PycharmProjects/PythonProject/pyvideotrans/videotrans/task/job.py", line 105, in run

trk.recogn()

File "/Users/mac/PycharmProjects/PythonProject/pyvideotrans/videotrans/task/_speech2text.py", line 104, in recogn

raise RuntimeError( self.cfg.basename + tr('recogn result is empty'))

RuntimeError: en.wav没有识别出字幕,请检查是否包含人类说话声音,以及说话语言是否和你选择的原始语言{lang}匹配,如果都正常,请在标准功能模式下选择 保留背景音 重试

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/mac/PycharmProjects/PythonProject/pyvideotrans/videotrans/task/job.py", line 116, in run

from videotrans.configure._except import get_msg_from_except

File "/Users/mac/PycharmProjects/PythonProject/pyvideotrans/videotrans/configure/_except.py", line 9, in

from deepgram.clients.common.v1.errors import DeepgramApiError

ModuleNotFoundError: No module named 'deepgram'


=
system:macOS-26.0.1-arm64-arm-64bit
version:v3.82
frozen:False
language:zh
root_dir:/Users/mac/PycharmProjects/PythonProject/pyvideotrans
Python: 3.10.17 (main, Apr 8 2025, 12:10:59) [Clang 17.0.0 (clang-1700.0.13.3)]

1 Replies

根据错误信息,您的问题有两个方面:

  1. 主要问题:语音识别失败,en.wav 文件没有识别出任何字幕。这通常是因为:

    • 音频文件不包含清晰的人类语音
    • 原始语言选择与音频实际语言不匹配
    • 音频质量较差或背景噪音过大
  2. 次要问题:缺少 deepgram 模块(这个不影响主要功能)

解决方案

  1. 检查音频内容

    • 确认 en.wav 文件确实包含清晰的人类说话声音
    • 播放音频文件验证内容
  2. 验证语言设置

    • 在软件主界面确认选择的"原始语言"与音频实际语言一致
    • 如果是英语音频,请选择"英语"
  3. 尝试保留背景音模式

    • 在主界面勾选"保留原始背景音"选项后重试
    • 这个模式处理时间较长但识别效果更好
  4. 如果问题依旧

    • 尝试使用其他语音识别渠道,如切换到 openai-whisper(本地)
    • 或者上传一个包含清晰语音的测试文件验证软件功能

请先按上述步骤检查音频文件和语言设置,这应该能解决识别问题。

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions