Files
piper-openai-proxy/README.md
2026-03-23 12:22:54 +00:00

1.1 KiB

piper-openai-proxy

OpenAI-compatible TTS API proxy for Piper via the Wyoming protocol.

Any tool that speaks the OpenAI /v1/audio/speech API can use your local Piper instance without modification.

Usage

python3 server.py

Environment variables:

  • PIPER_HOST — Piper Wyoming host (default: 192.168.86.11)
  • PIPER_PORT — Piper Wyoming port (default: 10200)
  • LISTEN_PORT — Proxy listen port (default: 8951)

API

# Generate speech
curl -X POST http://localhost:8951/v1/audio/speech \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello world"}' \
  -o speech.wav

# Health check
curl http://localhost:8951/health

Requirements

How it works

The proxy translates OpenAI TTS API requests into Wyoming protocol messages over a raw TCP socket. Piper generates the audio, and the proxy wraps the raw PCM in a WAV container and returns it.

License

MIT