This commit fixes several critical issues that prevented the service from deploying correctly and loading the TTS models. - **Fix Model Loading:** Corrected the volume mount path in to point to the correct source directory. The engine code was also updated to use absolute paths () inside the container, making the model loading mechanism robust. - **Update Session Resume:** The has been updated to reflect the final debugging steps and the successful resolution of all issues.
AudioEngineHub
AudioEngineHub is a local-first, modular, multi-engine Text-to-Speech (TTS) server designed for homelabs and automation. It provides a single, unified API to interact with various TTS engines like Piper and StyleTTS.
Features
- Multi-Engine Support: Easily switch between different TTS engines.
- Configurable Engines: Activate or deactivate engines on the fly via a simple configuration file.
- Caching: Caches generated audio to save resources and provide faster responses for repeated requests.
- Dockerized: Runs in a containerized environment for easy setup and dependency management.
- Automatic Port Finding: Automatically finds and uses a free port, preventing conflicts.
Getting Started
Prerequisites
Installation
-
Clone the repository:
git clone <repository_url> cd AudioEngineHub -
Configure the environment: Create a
.envfile by copying the example file:cp .env.example .envOpen the
.envfile and configure theACTIVE_ENGINESlist to include the engines you want to use. For example:ACTIVE_ENGINES='["piper", "styletts"]' -
Build and start the container: Use the
make upcommand to build the Docker image and start the service.make upThis command will automatically find a free port starting from 8000 and run the application on it.
Note: For the most reliable port detection, it is recommended to run the command with
sudo:sudo make up
Usage
The application provides a simple API to generate speech and inspect the available engines.
Endpoints
POST /tts: The main endpoint to synthesize text to speech.GET /health: Check the health of the API and the status of the loaded engines.GET /engines: List the currently active engines.GET /models: List the available models for each active engine. _GET /speakers: List the available speakers for a given engine and model.
Makefile Commands
The project includes a Makefile with several commands to simplify development and management:
make up: Build the image and start the application container.make down: Stop the application container.make logs: View the application logs.make health-check: Run a sanity check to ensure the deployed container is healthy and all engines are "ok".make test: Run thepytesttest suite.make help: Display a list of all available commands.
Configuration
The application is configured through the .env file in the root of the project.
ACTIVE_ENGINES: A comma-separated list of strings specifying which TTS engines to activate. Available engines are defined inapp/main.py.HOST: The host address for the server (defaults to0.0.0.0).PORT: The internal port for the server (defaults to8000).IMAGE_NAME: The name of the Docker image to build (defaults toaudioenginehub).