Chatterbox-TTS-Server icon indicating copy to clipboard operation
Chatterbox-TTS-Server copied to clipboard

Server hangs on startup after Python downgrade and system restart

Open kiritzoa-art opened this issue 10 months ago • 2 comments

Hello,

I am encountering an issue when launching the project after restarting my PC.

Initially, I had Python 3.12 installed. While following the setup instructions, I ran into compatibility issues, so I downgraded to Python 3.10. After doing so, the project worked correctly on the first run.

However, after restarting my computer, the issue appeared again. The launcher goes through all setup steps successfully (Python detection, virtual environment, GPU/CUDA detection, configuration loading), but then hangs while starting the server. It stops at the message indicating it is waiting for the server to start / model to load, and does not proceed further.

I have attached a screenshot of the console output showing where it gets stuck.

Environment details:

OS: Windows

Python version: 3.10.11

GPU: NVIDIA (CUDA 12.1 detected)

Installation type: NVIDIA GPU

Virtual environment created successfully

Please let me know if additional logs or information would be helpful. Thank you for your work on this project.

Image

kiritzoa-art avatar Jan 09 '26 01:01 kiritzoa-art

The ChatterBox TTS is still referring to python path as your old path of python 3.12 , try python start.py --reinstall

fahad-cpp avatar Jan 10 '26 06:01 fahad-cpp

It is happening here looks like it has to be socket exception for some reason

def wait_for_server(host, port, timeout=SERVER_STARTUP_TIMEOUT):
    """
    Wait for server to become ready by polling the port.

    Args:
        host: Host address
        port: Port number
        timeout: Maximum seconds to wait

    Returns:
        True if server is ready, False if timeout
    """
    print_substep(
        "Waiting for server to start (model loading may take 30-90 seconds)..."
    )

    start_time = time.time()
    check_host = "127.0.0.1" if host == "0.0.0.0" else host

    # Progress indicator
    sys.stdout.write("      ")
    sys.stdout.flush()

    dots = 0
    last_dot_time = start_time

    while time.time() - start_time < timeout:
        try:
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sock.settimeout(1)
            result = sock.connect_ex((check_host, port))
            sock.close()

            if result == 0:
                # Server is ready
                sys.stdout.write("\n")
                sys.stdout.flush()
                elapsed = time.time() - start_time
                print_substep(f"Server ready! (took {elapsed:.1f}s)", "done")
                return True

        except socket.error:
            pass

        # Show progress dots
        current_time = time.time()
        if current_time - last_dot_time >= 2:
            sys.stdout.write(".")
            sys.stdout.flush()
            dots += 1
            last_dot_time = current_time

            # Line wrap every 30 dots
            if dots % 30 == 0:
                sys.stdout.write("\n      ")
                sys.stdout.flush()

        time.sleep(PORT_CHECK_INTERVAL)

    # Timeout reached
    sys.stdout.write("\n")
    sys.stdout.flush()
    print_substep(f"Timeout after {timeout}s waiting for server", "error")
    return False


fahad-cpp avatar Jan 10 '26 06:01 fahad-cpp