#4247 openai.InternalServerError: Error code: 500 - {'error': {'message': 'Error: Edge TTS API error: 400 ', 'type': 'api_erro

2a09:bac5* Posted at: 2 hours ago 👁6

500: Error code: 500 - {'error': {'message': 'Error: Edge TTS API error: 400 ', 'type': 'api_error', 'param': 'e, +0%, +0Hz, +0%,general, audio-24khz-48kbitrate-mono-mp3', 'code': 'edge_tts_error'}}:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 342, in run
File "videotrans\tts\_base.py", line 178, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_openaitts.py", line 53, in _run
File "openai\_response.py", line 626, in enter
File "openai\resources\audio\speech.py", line 104, in create
File "openai\_base_client.py", line 1297, in post
File "openai\_base_client.py", line 1070, in request
openai.InternalServerError: Error code: 500 - {'error': {'message': 'Error: Edge TTS API error: 400 ', 'type': 'api_error', 'param': 'e, +0%, +0Hz, +0%,general, audio-24khz-48kbitrate-mono-mp3', 'code': 'edge_tts_error'}}


=
system:Windows-10-10.0.26100-SP0
version:v3.98
frozen:True
language:en
root_dir:Q:/win-pyvideotrans-v3.98-312

1 Replies

This is an Edge-TTS API 400 error, indicating that the TTS server you are connecting to (likely a self-hosted Edge-TTS API proxy or a third-party service like 302.AI) rejected the request due to invalid parameters.

The error highlights that the parameters e, +0%, +0Hz, +0%,general, audio-24khz-48kbitrate-mono-mp3 are not recognized by that API. This usually happens when:

  1. You are using a self-deployed Edge-TTS API that is outdated or misconfigured.
  2. The API endpoint expects a different format (e.g., OpenAI TTS compatible format) but you are sending Edge-TTS specific parameters.
  3. There is a conflict with the TTS Settings > Edge-TTS configuration in the pyVideoTrans menu.

Solution steps:

  1. Change TTS Channel: In the main interface, switch the "TTS Channel" from Edge-TTS to OpenaiTTS temporarily. If you are using a service that provides an OpenAI-compatible API (like 302.AI or a custom edge-tts-to-openai proxy), configure the OpenaiTTS channel with the correct API URL and Key, and use a model like tts-1 or tts-1-hd.
  2. Check API Service: If you deployed the Edge-TTS API service yourself (e.g., using edge-tts-openai-api), make sure it is up to date and running properly.
  3. Check Advanced Settings: Go to Menu > Tools/Options > Advanced Options > Subtitle dubbing adjustments:

    • Set EdgeTTS dubbing channel concurrent number to 1.
    • Set EdgeTTS dubbing channel retry count to 1 or 2.
    • Reduce the Dubbing pause seconds to 5.
  4. Verify API Address: Go to Menu > TTS Settings > Edge-TTS and ensure the API URL is correct (e.g., http://127.0.0.1:7860/v1 or the correct 302.AI endpoint). If you are not using a custom API, leave this field empty to use the built-in free Edge-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.

Related resource

Similar issues already exist