This commit integrates support for pushing and pulling Docker images from a container registry and enhances the Makefile for a more flexible development workflow.
Key changes include:
- **Container Registry Configuration:** Added and variables to the Makefile and updated and targets to correctly tag and push images to the configured registry.
- **Docker Compose Registry Integration:** Modified to use the image from the registry by default instead of building locally.
- **Makefile Workflow Enhancements:**
- Introduced a target (Pulling image git.wlkns.org/stephan/audio-engine-hub:latest from registry...
docker pull git.wlkns.org/stephan/audio-engine-hub:latest) for explicitly downloading images from the registry.
- Modified the target (Starting development environment by pulling image from registry...
export IMAGE_NAME=audio-engine-hub && \
export REGISTRY=git.wlkns.org && \
export USERNAME=stephan && \
export TAG=latest && \
docker compose up -d) to use the registry image.
- Added a target (Starting development environment (local build) on port 8000...) for local development, which explicitly builds the image from source () before starting the service.
- Updated and GNU bash, Version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Diese Shellkommandos sind intern definiert. Geben Sie »help« ein, um diese
Liste zu sehen. Geben Sie »help Name« ein, um die Beschreibung der Funktion
»Name« zu sehen. Geben Sie »info bash« ein, um die vollständige Dokumentation
zu sehen. Geben Sie »man -k« oder »info« ein, um detaillierte Beschreibungen
der Shellkommandos zu sehen.
Ein Stern (*) neben dem Namen kennzeichnet deaktivierte Kommandos.
Jobbezeichnung [&] history [-c] [-d Offset] [n] oder history -anrw [Dateiname] oder histor>
(( Ausdruck )) if Kommandos; then Kommandos; [ elif Kommandos; then Kommandos; ]... [ >
. Dateiname [Argumente] jobs [-lnprs] [Jobbezeichnung ...] or jobs -x Kommando [Arg]
: kill [-s Signalname | -n Signalnummer | -Signalname] pid | jobspec ... >
[ Argument... ] let Argument [Argument ...]
[[ Ausdruck ]] local [Option] Name[=Wert] ...
alias [-p] [Name[=Wert] ... ] logout [n]
bg [Jobbezeichnung ...] mapfile [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t] [-u fd]>
bind [-lpsvPSVX] [-m Tastaturtabelle] [-f Dateiname] [-q Name] [-u Name]> popd [-n] [+N | -N]
break [n] printf [-v var] Format [Argumente]
builtin [Shell-Kommando [Argument ...]] pushd [-n] [+N | -N | Verzeichnis]
caller [Ausdruck] pwd [-LP]
case Wort in [Muster [| Muster]...) Kommandos ;;]... esac read [-ers] [-a Feld] [-d Begrenzer] [-i Text] [-n Zeichenanzahl] [-N Z>
cd [-L|[-P [-e]] [-@]] [Verzeichnis] readarray [-d Begrenzer] [-n Anzahl] [-O Quelle] [-s Anzahl] [-t] >
command [-pVv] Kommando [Argument ...] readonly [-aAf] [Name[=Wert] ...] oder readonly -p
compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlis> return [n]
complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A action] [-G globpa> select Name [in Wortliste ... ;] do Kommandos; done
compopt [-o|+o Option] [-DEI] [Name ...] set [-abefhkmnptuvxBCHP] [-o Option] [--] [Argument ...]
continue [n] shift [n]
coproc [Name] Kommando [Umleitungen] shopt [-pqsu] [-o] [Optionsname ...]
declare [-aAfFgiIlnrtux] [-p] [Name[=Wert] …] source Dateiname [Argumente]
dirs [-clpv] [+N] [-N] suspend [-f]
disown [-h] [-ar] [Jobbezeichnung ... | pid ...] test [Ausdruck]
echo [-neE] [Argument ...] time [-p] Pipeline
enable [-a] [-dnps] [-f Dateiname] [Name ...] times
eval [Argument ...] trap [-lp] [[Argument] Signalbezeichnung ...]
exec [-cl] [-a Name] [Befehl [Argument …]] [Umleitung …] true
exit [n] type [-afptP] Name [Name ...]
export [-fn] [Name[=Wert] ...] oder export -p typeset [-aAfFgiIlnrtux] [-p] Name[=Wert] …
false ulimit [-SHabcdefiklmnpqrstuvxPT] [Grenze]
fc [-e Editor] [-lnr] [Anfang] [Ende] oder fc -s [Muster=Ersetzung] [Kom> umask [-p] [-S] [Modus]
fg [Jobbezeichnung] unalias [-a] Name [Name ...]
for Name [in Wortliste ... ] ; do Kommandos; done unset [-f] [-v] [-n] [NAME ...]
for (( Ausdruck1; Ausdruck2; Ausdruck3 )); do Kommandos; done until Kommandos; do Kommandos; done
function Name { Kommandos ; } oder Name () { Kommandos ; } variables - Namen und Bedeutung einiger Shell-Variablen
getopts optstring name [arg ...] wait [-fn] [-p var] [id ...]
hash [-lr] [-p Pfadname] [-dt] [Name ...] while Kommandos; do Kommandos; done
help [-dms] [Muster ...] { Kommandos ; } targets accordingly.
- **Session Resume Update:** Updated to document the container registry integration.
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).