#2626 requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.inworld.ai/tts/v1/voice

84.226* Posted at: 16 hours ago 👁8

400 Client Error: Bad Request for url: https://api.inworld.ai/tts/v1/voice:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 299, in run
File "videotrans\tts\_base.py", line 179, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_ttsapi.py", line 66, in _run
File "videotrans\tts\_ttsapi.py", line 111, in _apirequests
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.inworld.ai/tts/v1/voice


=
system:Windows-10-10.0.26200-SP0
version:v3.92
frozen:True
language:en
root_dir:C:/PyVideoTrans

1 Replies

The error indicates a "400 Bad Request" when connecting to the Inworld AI TTS API. This is typically caused by an incorrect or missing API key, or an invalid request format.

To resolve this, please follow these steps:

  1. Verify Your Inworld AI API Key:

    • Go to the main interface of PyVideoTrans.
    • Click on the "Settings" button (the gear icon).
    • Navigate to the "TTS Settings" tab.
    • Find the "Inworld AI" section and ensure your API Key is correctly entered in the designated field. The key must be exactly as provided by Inworld AI.
  2. Check API Key Permissions and Quota:

    • Log in to your Inworld AI account dashboard.
    • Verify that your API key is active and has not expired.
    • Confirm that your account has sufficient quota or credits for the TTS service.
  3. Review Request Parameters:

    • The error might also be due to an unsupported voice_role or target_language_code being sent in the request.
    • In the main interface, ensure you have selected a valid voice role from the dropdown menu for Inworld AI TTS.
    • Double-check that the Target Language you selected is supported by the Inworld AI service.
  4. Test with a Simple Request (Optional):

    • You can try using the "Test" or "Preview" function next to the voice role selector in the TTS settings to see if a simple request works.

If the problem persists after verifying the above, please provide the complete log file from C:/PyVideoTrans/logs/ for further analysis.

Please refer to the documentation for more details:

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

Similar issues already exist

Trending Questions