#7231 cosyvoice Service must be deployed and running before useself.api_url='http://127.0.0.1:8000'

103.29**5 Posted at: 1 hour ago

cosyvoice Service must be deployed and running before use
self.api_url='http://127.0.0.1:8000'
[WinError 10061] No connection could be made because the target machine actively refused it

Traceback (most recent call last):
File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions
File "httpx\_transports\default.py", line 250, in handle_request
File "httpcore\_sync\connection_pool.py", line 216, in handle_request
File "httpcore\_sync\connection_pool.py", line 196, in handle_request
File "httpcore\_sync\connection.py", line 99, in handle_request
File "httpcore\_sync\connection.py", line 76, in handle_request
File "httpcore\_sync\connection.py", line 122, in _connect
File "httpcore\_backends\sync.py", line 205, in connect_tcp
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ConnectError: [WinError 10061] No connection could be made because the target machine actively refused i
......
ll last):
File "videotrans\task\only_one.py", line 107, in run
File "videotrans\task\_stage_dubbing.py", line 24, in dubbing
File "videotrans\task\_stage_dubbing.py", line 101, in _tts
File "videotrans\tts\__init__.py", line 233, in run
File "videotrans\tts\_base.py", line 103, in run
File "videotrans\tts\_base.py", line 206, in _exec
File "videotrans\tts\_base.py", line 166, in _local_mul_thread
File "videotrans\tts\_base.py", line 218, in _item_task
File "videotrans\tts\_cosyvoice.py", line 37, in _run
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_gradio.py", line 76, in _send
videotrans.configure.excepts.StopTask: cosyvoice Service must be deployed and running before use
self.api_url='http://127.0.0.1:8000'
[WinError 10061] No connection could be made because the target machine actively refused it

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/SF/Videos/Renegade Immortal Battle of Gods Episode 1.mp4,
输出结果保存到文件夹: C:/Users/SF/Videos/_video_out/Renegade Immortal Battle of Gods Episode 1-mp4,
临时文件夹: C:/Users/SF/Downloads/Compressed/win-pyvideotrans-v4.11/tmp/12832/026c21526a
已选 清理已存在
未启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), large-v3-turbo, 发音语言: Simplified Chinese, 断句方式:默认断句
TranslateSrt:Microsoft Translate (Free),原始语言:Simplified Chinese,目标语言:Hindi, 已选 SendSRT
TTS Service:CosyVoice(LocalAPI), 角色:clone, 配音语言:Hindi, 已选 二次语音识别
音量:+0%, 语速:+0%, 未选 音频加速, 未选 视频慢速
未选 移除字幕间空隙, 未选 强制对齐字幕和声音
字幕: No Subtitles


=
system:Windows-10-10.0.26200-SP0
version:v4.11
frozen:True
language:en
root_dir:C:/Users/SF/Downloads/Compressed/win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 1 hour ago

This is not a bug in pyVideoTrans. The error [WinError 10061] No connection could be made because the target machine actively refused it means no CosyVoice service is running at http://127.0.0.1:8000. The CosyVoice channel is a "Local API" channel — pyVideoTrans only sends requests to a CosyVoice service that you must deploy and start yourself. The connection is refused because nothing is listening on port 8000.

Solutions (do one of the following):

  1. Deploy and start CosyVoice locally (required if you want to keep using the CosyVoice channel).

    • Clone and set up the CosyVoice project from its official repository.
    • Start its API/Gradio service so that it listens on http://127.0.0.1:8000.
    • Verify it works: open http://127.0.0.1:8000 in your browser. If the page/schema loads, the service is up. Then re-run the task in pyVideoTrans.
    • If your CosyVoice service runs on a different port, open Menu -> TTS Settings -> CosyVoice and change the API address accordingly (do NOT use 0.0.0.0; use 127.0.0.1).
  2. Don't want to deploy CosyVoice? Switch to another dubbing channel. For Hindi voice cloning, choose a channel that supports cloning and Hindi without a separate deployment, for example:

    • OmniVoice-TTS (Built-in) — supports 600+ languages including Hindi, supports clone.
    • Qwen-TTS (Built-in) or the cloud Qwen-TTS (bailian).
    • Edge-TTS (Free) if you don't need cloning (pick a Hindi voice like hi-IN-MadhurNeural).

Also note on your current task config:

  • Your target language is Hindi, but you selected the CosyVoice channel, which officially supports Chinese, English, Japanese, Korean, German, Spanish, French, Italian and Russian — Hindi is not in that list. Even with the service running, Hindi dubbing via CosyVoice will likely fail. Prefer OmniVoice-TTS or an online TTS that supports Hindi.
  • You selected the clone role. Clone requires the original video's audio to be clipped into 3–10s reference clips. Make sure in Menu -> Tools -> Advanced Options -> ASR Settings that min speech duration is around 3000–4000 ms, otherwise cloning will frequently error.

请查阅相关文档:

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