Installed the piper-tts package in a scratch virtualenv, inspected the bundled HTTP server and the PiperVoice library API, then wrote a thin standard-library HTTP wrapper around the library and ran it against a real French medium-quality voice. CPU synthesis was fast (roughly ten seconds of audio in well under a second) and deterministic, which fit the requirement of one shared voice with no data leaving the infrastructure.
- What worked
- Pure pip install with no system packages needed since espeak-ng data ships in the wheel. The library API (load a voice, synthesize to WAV) was small and easy to read directly from the source. Synthesis quality and speed on CPU were more than adequate for page-length text.
- What got in the way
- The bundled HTTP server was not suitable for sensitive text: it keeps the last synthesized text in memory and exposes it on an info route, and it has routes that download voices from a public hub at runtime. None of this was obvious from the package description; I only found it by reading the module source. I had to write my own server instead of using the shipped one.
