chatterbox-ui/backend
Steve White 3548485b4e Singleton manages memory well and fast. 2025-06-26 14:56:53 -05:00
..
app Singleton manages memory well and fast. 2025-06-26 14:56:53 -05:00
.env.example updated with startup script 2025-06-17 16:26:55 -05:00
README.md Patched up to work on m3 laptop. Need to fix the location specific shit. 2025-06-07 16:06:38 -05:00
requirements.txt updated with startup script 2025-06-17 16:26:55 -05:00
run_api_test.py added single line generation to the backend 2025-06-06 08:26:15 -05:00
start_server.py updated with startup script 2025-06-17 16:26:55 -05:00

README.md

Chatterbox TTS Backend

This directory contains the FastAPI backend for the Chatterbox TTS application.

Project Structure

  • app/: Contains the main FastAPI application code.
    • __init__.py: Makes app a Python package.
    • main.py: FastAPI application instance and core API endpoints.
    • services/: Business logic for TTS, dialog processing, etc.
    • models/: Pydantic models for API request/response.
    • utils/: Utility functions.
  • requirements.txt: Project dependencies for the backend.
  • README.md: This file.

Setup & Running

Prerequisites

  • Python 3.8 or higher
  • A Python virtual environment (recommended)

Installation

  1. Navigate to the backend directory:

    cd /path/to/chatterbox-ui/backend
    
  2. Set up a virtual environment (if not already created):

    python -m venv .venv
    source .venv/bin/activate  # On macOS/Linux
    # .\.venv\Scripts\activate  # On Windows
    
  3. Install dependencies:

    pip install -r requirements.txt
    

Running the Development Server

From the backend directory, run:

uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Accessing the API

Once running, you can access:

  • API documentation (Swagger UI): http://127.0.0.1:8000/docs
  • Alternative API docs (ReDoc): http://127.0.0.1:8000/redoc
  • API root: http://127.0.0.1:8000/

Development Notes

  • The --reload flag enables auto-reload on code changes
  • The server will be accessible on all network interfaces with --host 0.0.0.0
  • Default port is 8000, but you can change it with --port <port_number>