#7856 API URL is error: :{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'role': 'zh_female_tw.wav', 'filename': 'D:/PYTRAN/tmp/20552/1

2402**539b Posted at: 2 hours ago

API URL is error: :
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'role': 'zh_female_tw.wav', 'filename': 'D:/PYTRAN/tmp/20552/1791331612.4645383-cosyvoice.wav', 'tts_type': 14}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 122, in run
File "", line 20, in init
File "videotrans\tts\_cosyvoice.py", line 12, in post_init
File "videotrans\tts\_gradio.py", line 29, in post_init
videotrans.configure.excepts.StopTask: API URL is error:


=
system:Windows-10-10.0.26200-SP0
version:v4.15
frozen:True
language:en_US
root_dir:D:/PYTRAN

1 Replies

#1 DeepSeek reply at 2 hours ago

The root cause is that the CosyVoice TTS channel (tts_type=14) is configured to call a Gradio API, but the API URL field is empty (API URL is error: with nothing after it). The code path shows _cosyvoice.py → _gradio.py, which means CosyVoice is being accessed via the Gradio interface and requires a valid WebUI/API address.

Steps to fix:

  1. Make sure your local CosyVoice service is actually running and that its WebUI page works in a browser.
  2. Open the software menu: Menu → TTS Settings → CosyVoice (设置 → TTS设置 → CosyVoice).
  3. Fill in the correct API/WebUI URL, for example http://127.0.0.1:50000/ (use the actual host and port your CosyVoice service is listening on).

    • Do not use 0.0.0.0 — replace it with 127.0.0.1 if that's what you wrote.
  4. Save the settings, then restart the software (or re-open the TTS settings window) so the new URL takes effect.
  5. If you are using the Gradio WebUI, ensure a gradio_api.txt file exists in the software root directory (D:/PYTRAN) with the correct api_name and parameter mapping for your CosyVoice version.
  6. Retry the dubbing.

Additional notes:

  • The role zh_female_tw.wav is being treated as a voice/clone reference file. Confirm this file exists under the f5-tts folder or is properly registered via Menu → TTS Settings → Set Reference Audio.
  • If CosyVoice is not actually deployed, switch to a built-in free channel such as Edge-TTS to avoid this error.

Please refer to the relevant documentation:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource