|
||
---|---|---|
.. | ||
app | ||
README.md | ||
requirements.txt | ||
run_api_test.py |
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
: Makesapp
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
-
Navigate to the backend directory:
cd /path/to/chatterbox-ui/backend
-
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
-
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>