# Repository Briefing: OHF-Voice/piper1-gpl
> Source: https://repoforai.com/repo/OHF-Voice/piper1-gpl (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/OHF-Voice/piper1-gpl
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: C++
- **License**: GPL-3.0
- **Engineering Health**: A (86/100 · Maintenance 35/35 · Adoption 20/25 · Releases 20/20 · License 11/20)
- **Latest Release**: v1.9.0 (2026-12-03) — https://github.com/OHF-Voice/piper1-gpl/releases
- **Review Snapshot**: 2026-12-01 (Note: v1.9.0 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Docker, Self-Hosted, Local AI, CLI, API
- **Momentum**: 6,513 ★ total (+3 24h / +78 7d) · 665 forks
- **When to Use**: Best for: Home automation, accessibility tools, and on-device narration that need local synthesis and can validate a fixed set of voices on target hardware. Skip if: You need a managed voice service with no inference operations, or you cannot meet the engine and voice licensing requirements for your distribution model.

## Overview
```text
### Architecture & Core Mechanics
Piper is a local neural text-to-speech engine. Incoming text is converted to phonemes before the selected voice synthesizes audio. The engine embeds espeak-ng as its general phonemization path; voice configuration can select language-specific paths, such as `japanese` or `thai`. That separation lets pronunciation rules change without changing how callers submit text. Don't assume the language extras define a generic plugin interface: the concrete mechanism is selection through the voice configuration.

The source tree separates the Python package in `src/piper/` from the native `libpiper/` surface. Callers can embed synthesis via Python or C/C++, invoke it from the CLI, or place it behind the Flask HTTP server. The package build brings together setuptools, scikit-build, CMake, and Ninja; those are build dependencies, not services required at inference time.

### Key Capabilities & Differentiators
Piper converts text to speech locally and supports training new voices. Its language-specific front ends address distinct pronunciation problems: v1.7.0 adds OpenJTalk through `pyopenjtalk-plus` in the `ja` extra to address gaps in kanji readings and pitch accent; v1.8.0 adds TLTK in the `th` extra to handle unspaced Thai text and leading-vowel ordering. Both expose matching training and synthesis settings: `--data.phoneme_type japanese` or `thai` at training time, and the corresponding `phoneme_type` value in the voice configuration at synthesis time.

For Chinese, v1.6.1 moves g2pW to `piper.g2pw_onnx`, using ONNX Runtime directly and removing PyTorch and requests from the `zh` extra. That change concerns pronunciation preprocessing; it is not an end-to-end speech throughput measurement. Evaluate candidate voices on actual text, including names, numerals, and mixed-language passages, rather than treating a dedicated phonemizer as a guarantee of output quality.

### Trade-offs & Limitations
Against a hosted option such as ElevenLabs, Piper trades a managed service for control over where text is processed, which voices are deployed, and when versions change. It removes the hosted TTS request path during synthesis, not the cost of running inference. Real-time suitability is workload-dependent: start with a CPU baseline on the target device and measure cold starts, resident memory, and audio generation speed using the chosen voice, representative text, and expected concurrency. Don't infer an end-to-end latency or GPU requirement from the language runtime changes.

The GPL-3.0 engine and individual voices need separate license reviews. Internal self-hosting and distributing an appliance, application, or image that includes Piper are different decisions. If you plan to ship an integration built on libpiper, assess the GPL obligations before committing to that architecture, and independently verify the commercial-use terms of the selected voice.

### Hardware & Deployment Guide
Start with `pip install piper-tts`, make the chosen voice and its configuration available locally, and install the phonemizer extra if the voice needs one. Use the CLI for smoke tests, embed via an API when synthesis belongs in the application, or run the HTTP service when it needs a separate lifecycle. For offline deployments, stage the package, language dependencies, and voice assets in advance; verify startup and synthesis with network access disabled.

The Dockerfile uses `python:3.12` with build-essential, CMake, Ninja, and Git to build a Linux wheel. The `python:3.12-slim` stage installs that wheel and `flask>=3,<4`, declares port 5000, and launches `/entrypoint.sh`. Treat 5000 as a container port declaration, not a host networking or access-control policy. Pin the engine, voice assets, and applicable extras together: v1.6.1 reduced the Chinese dependency footprint, while v1.7.0 and v1.8.0 added opt-in Japanese and Thai front ends.
```

## Key Capabilities
```text
- Integration: CLI and Flask HTTP server for process-level use, plus Python and C/C++ APIs for embedding.
- Phonemization: Embedded espeak-ng as the general path, with voice-configured Japanese and Thai alternatives.
- Mandarin preprocessing: v1.6.1 runs g2pW via ONNX Runtime and removes PyTorch and requests from the zh extra.
- Japanese and Thai: v1.7.0 adds OpenJTalk via pyopenjtalk-plus; v1.8.0 adds TLTK with a Thai training and synthesis configuration.
- Container build: A Python 3.12 builder produces a Linux wheel; the slim runtime installs Flask 3.x and exposes port 5000.
- Voice lifecycle: Train new voices, validate pronunciation with production text, and review voice licenses independently of the GPL-3.0 engine.
```

## Quick Start / Clone
```bash
git clone --depth 1 https://github.com/OHF-Voice/piper1-gpl.git
cd piper1-gpl
```
