#1085 edge_tts.exceptions.NoAudioReceived: No audio was received. Please verify that your parameters are correct.

35.212* Posted at: 2 months ago 👁1238

操作失败,请稍后重试:
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 128, in run
RuntimeError: no running event loop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 248, in run
File "videotrans\tts\_base.py", line 182, in run
File "videotrans\tts\_edgetts.py", line 70, in _create_audio_with_retry
File "asyncio\tasks.py", line 445, in wait_for
File "edge_tts\communicate.py", line 590, in save
File "edge_tts\communicate.py", line 566, in stream
File "edge_tts\communicate.py", line 541, in __stream
edge_tts.exceptions.NoAudioReceived: No audio was received. Please verify that your parameters are correct.


=
Windows-10-10.0.19045-SP0
version:v3.81
frozen:True
language:zh

9 Replies

这个错误是由于 Edge-TTS 在异步环境中运行时事件循环问题导致的。请按以下步骤解决:

  1. 重启软件:完全关闭 pyVideoTrans 并重新启动。
  2. 如果问题依旧,修改配音参数

    • 在菜单栏选择 工具/选项 -> 高级选项
    • 在"配音调整"区域,将"同时配音字幕数"改为 1
    • 将"配音后暂停时间/秒"改为 3-5
  3. 检查网络连接:确保网络稳定,Edge-TTS 需要访问微软服务器。
  4. 尝试其他配音渠道:如果上述方法无效,可以暂时切换到其他 TTS 服务,如 OpenAI TTS 或 Azure TTS。

这个错误通常是由于异步事件循环在特定环境下初始化异常导致的,重启软件和调整配音参数通常可以解决。

can you please translate your reply to english

This error is caused by an event loop issue when Edge-TTS runs in an asynchronous environment. Please follow these steps to resolve it:

  1. Restart the software: Completely close pyVideoTrans and restart it.
  2. If the problem persists, modify the dubbing parameters:

    • In the menu bar, select Tools/Options -> Advanced Options.
    • In the "Dubbing Adjustment" section, change "Concurrent Dubbing Subtitle Count" to 1.
    • Change "Pause Time After Dubbing / Seconds" to 3-5.
  3. Check your network connection: Ensure your network is stable, as Edge-TTS needs to access Microsoft servers.
  4. Try other dubbing channels: If the above methods don't work, you can temporarily switch to other TTS services, such as OpenAI TTS or Azure TTS.

This error is usually caused by abnormal initialization of the asynchronous event loop in specific environments. Restarting the software and adjusting the dubbing parameters typically resolves it.

还是没用

根据错误信息 edge_tts.exceptions.NoAudioReceived: No audio was received,这明确是 Edge-TTS 服务端的问题,而非本地事件循环错误。请按以下步骤彻底排查:

  1. 检查网络代理

    • 如果您使用了代理,请确保代理设置正确且能正常访问国际网络。
    • 在软件主界面第5行“网络代理”处,尝试清空代理设置,让软件直连,或者填入一个可用的代理地址(格式如 http://127.0.0.1:10809)。
  2. 彻底修改高级参数

    • 进入 工具/选项 -> 高级选项
    • 配音调整

      • 同时配音字幕数:设置为 1
      • 配音后暂停时间/秒:设置为 10(大幅增加间隔)。
      • EdgeTTS失败重试次数:设置为 3
    • 保存并重启软件
  3. 更换配音角色

    • 返回主界面,在第4行“配音”处,尝试选择一个不同性别不同语言区域的 Edge-TTS 角色(例如,从 zh-CN-XiaoxiaoNeural 换成 en-US-AriaNeural)。
    • 点击角色旁边的“试听”按钮,看是否能成功播放试听音频。如果试听也失败,则100%是网络/服务问题。
  4. 终极解决方案:更换配音渠道

    • 如果以上步骤均无效,说明您的网络环境暂时无法稳定连接微软 Edge-TTS 服务器。
    • 请切换到其他可用的配音渠道,例如:

      • VITS-cnen(本地,免费,无需网络)
      • OpenAI TTS(需要API Key)
      • Azure TTS(需要API Key,但比Edge-TTS更稳定)

问题根源NoAudioReceived 错误意味着微软服务器没有返回音频数据,通常是由于IP限制、请求频率过高或临时服务故障。

请按顺序尝试上述步骤,并反馈结果。

我试听都出错,不用代理也出错image
image

根据您提供的截图,问题已经明确:Edge-TTS 服务在您的网络环境下完全不可用。请立即切换到其他配音渠道。

解决方案:

  1. 立即更换配音渠道(推荐方案):

    • 在主界面第4行“配音”处,将渠道从 Edge-TTS 切换到 VITS-cnen
    • VITS-cnen完全本地运行的TTS引擎,无需任何网络连接,速度极快,且支持中英文。
    • 切换后,选择一个 VITS 角色(如 中文-标准女声),然后点击“试听”。应该能立即成功。
  2. 如果仍需在线服务,请配置可用的API:

    • 如果您希望使用更自然的声音,可以配置以下在线服务(需要API Key):

      • OpenAI TTS: 在“配音”处选择 OpenAI TTS,然后在“翻译设置”中填入您的 OpenAI API Key。
      • Azure TTS: 选择 Azure TTS,并在设置中填入 Azure 的密钥和区域。
    • 注意: 这些服务同样受网络环境影响,但比免费的 Edge-TTS 更稳定。

问题诊断:
您遇到的 NoAudioReceived 错误和试听失败,100% 确认是网络问题。微软的 Edge-TTS 免费服务对某些地区或网络运营商存在限制或间歇性阻断。继续尝试修复网络连接(如更换代理、使用全局模式等)的性价比很低。

因此,最直接有效的解决方案就是放弃 Edge-TTS,改用本地引擎 VITS-cnen

我的配音选择,完全没有VITS-cnenimage
image
image

您使用的是 v3.81 版本,该版本可能未内置 VITS-cnen 模型。请按以下步骤操作:

  1. 立即升级到最新版 v3.90

    • 前往官网下载最新完整包:https://pyvideotrans.com/downpackage
    • 重要:将软件解压到全新目录(如 D:\pyvideotrans_new),不要覆盖旧版本。
    • 新版本 v3.90 已内置并优化了 VITS-cnen 模型。
  2. 在 v3.81 中的临时解决方案

    • 如果无法立即升级,请在“配音”渠道中选择 piper-tts
    • piper-tts 同样是本地、免费的 TTS 引擎,无需网络。在右侧角色列表中选择一个中文角色(如 zh_CN 开头的)进行试听。
  3. 如果 piper-tts 也不可用或效果不佳

    • 您需要配置一个在线 TTS API。
    • 推荐配置 OpenAI TTS

      • 在“配音”处选择 OpenAI TTS
      • 点击菜单栏 设置/翻译设置
      • 在“OpenAI”选项卡中,填入您的 api-key
      • 返回主界面,选择一个 OpenAI TTS 角色(如 alloy)并试听。

核心结论:您的网络环境无法使用 Edge-TTS,最佳且一劳永逸的解决方案是升级到 v3.90 使用 VITS-cnen。在此之前,可使用 piper-tts 或配置 OpenAI TTS 作为临时替代。

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