#8742 kokoro(LocalAPI): [Kokoro-TTS] Service must be deployed and running before useself.api_url='http://127.0.0.1:5066/v1/aud

2a01**2211 Posted at: 15 hours ago

kokoro(LocalAPI): [Kokoro-TTS] Service must be deployed and running before use
self.api_url='http://127.0.0.1:5066/v1/audio/speech'

{'text': 'Hello, my dear friend, I hope every day of yours is wonderful and joyful!', 'role': 'af_alloy', 'filename': 'D:/!AI!/tmp/15712/1794271943.1444073-kokoro.wav', 'tts_type': 28}
Traceback (most recent call last):
File "urllib3\connection.py", line 198, in _new_conn
File "urllib3\util\connection.py", line 85, in create_connection
File "urllib3\util\connection.py", line 73, in create_connection
ConnectionRefusedError: [WinError 10061] Nem hozható létre kapcsolat, mert a célszámítógép már visszautasította a kapcsolatot

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 493, in _make_request
File "urllib3\connection.py", line 494, in request
File "http\client.py", line 1278, in endheaders
File "http\client.py", line 1038, in _send_output
File "http\client.py", line 976, in send
File "urllib3\connection.py", line 325, in connect
File "urllib3\connection.py", line 213, in _new_conn
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10061] Nem hozható létre kapcsolat, mert a célszámítógép már visszautasította a kapcsolatot

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "requests\adapters.py", line 644, in send
File "urllib3\connectionpool.py", line 841, in urlopen
File "urllib3\util\retry.py", line 519, in increment
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=5066): Max retries exceeded with url: /v1/audio/speech (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] Nem hozható létre kapcsolat, mert a célszámítógép már visszautasította a kapcsolatot'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\tts\_kokoro.py", line 33, in _run
File "requests\api.py", line 115, in post
File "requests\api.py", line 59, in request
File "requests\sessions.py", line 589, in request
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 677, in send
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5066): Max retries exceeded with url: /v1/audio/speech (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] Nem hozható létre kapcsolat, mert a célszámítógép már visszautasította a kapcsolatot'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 22, in run
File "videotrans\tts\__init__.py", line 135, in run
File "videotrans\tts\_base.py", line 98, in run
File "videotrans\tts\_base.py", line 201, in _exec
File "videotrans\tts\_base.py", line 161, in _local_mul_thread
File "videotrans\tts\_base.py", line 216, in _item_task
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\_kokoro.py", line 37, in _run
videotrans.configure.excepts.StopTask: [Kokoro-TTS] Service must be deployed and running before use
self.api_url='http://127.0.0.1:5066/v1/audio/speech'


=
system:Windows-10-10.0.26300-SP0
version:v4.18
frozen:True
language:en_US
root_dir:D:/!AI!

1 Replies

#1 DeepSeek reply at 15 hours ago

Core cause: the local Kokoro-TTS service is not running (or is not listening on port 5066). The error WinError 10061 ConnectionRefusedError / Max retries exceeded ... /v1/audio/speech means nothing accepted the connection at 127.0.0.1:5066, so this is not a software bug: the Kokoro-TTS (Local API) channel only forwards requests to a service you must deploy and start yourself.

Solution:

  1. Deploy and start a Kokoro-TTS API service on the same machine that serves POST /v1/audio/speech (the software expects the OpenAI-style speech endpoint).
  2. Start the service before starting the task, and confirm it is listening on the expected port:

    • open a browser or run in CMD: curl http://127.0.0.1:5066/v1/models (or any endpoint provided by that service). Only start the task after a response is returned.
  3. If your service runs on a different port or host, open the software's Menu → TTS Settings → Kokoro-TTS and change the API address (e.g. http://127.0.0.1:8880/v1/audio/speech) so that it matches the service. Never fill in 0.0.0.0 — use 127.0.0.1.
  4. If a firewall or antivirus prompt is shown that blocks the Python service process, allow it.
  5. If you do not have a Kokoro service, switch the TTS Service drop-down to Edge-TTS (Free) or another built-in channel to complete the dubbing. Do not select Kokoro-TTS (Local API) without a running service; it will always error out.
  6. Suggestion: the software directory you are using, namely D:/!AI!, contains the special character !, so it is recommended to move the program to a path that only uses English letters and digits. This is not the cause of this error, but such paths can cause other FFmpeg and path errors.

Please refer to the related 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