# compliance-tts-service

Python service generating German-language audio/video training materials using Piper TTS + FFmpeg. Outputs are stored in Hetzner Object Storage (S3-compatible).

**Port:** `8095` (container: `bp-compliance-tts`)
**Stack:** Python 3.12, Piper TTS (`de_DE-thorsten-high.onnx`), FFmpeg, boto3.

## Files

- `main.py` — FastAPI entrypoint
- `tts_engine.py` — Piper wrapper
- `video_generator.py` — FFmpeg pipeline
- `storage.py` — S3 client

## Run locally

```bash
cd compliance-tts-service
pip install -r requirements.txt
# Piper model + ffmpeg must be available on PATH
uvicorn main:app --reload --port 8095
```

## Tests

0 test files today. Adding unit tests for the synthesis pipeline (mocked Piper + FFmpeg) and the S3 client is still in the backlog queue.

## Architecture

Follow `../AGENTS.python.md`. Keep the Piper model loading behind a single service instance — not loaded per request.
