tts-service

Serve Hungarian text-to-speech via FastAPI endpoints with per-tenant voice configuration.

Updated May 20, 2025
One-click install
npx skills add https://github.com/papdawin/customer-service-assistant --skill tts-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tts-service
Source: https://github.com/papdawin/customer-service-assistant/tree/main/tts
Command: npx skills add https://github.com/papdawin/customer-service-assistant --skill tts-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a shared text-to-speech service for a multi-tenant Hungarian voice assistant platform, enabling real-time speech synthesis across tenants from a single deployment.

Core Features & Use Cases

  • HTTP Interfaces: health checks at /health and speech synthesis at /speak; supports JSON with base64 audio payload or binary WAV responses.
  • Model & Runtime: loads PiperVoice from ONNX with a configurable voice path and JSON config, controlled via environment variables.
  • Multi-tenant & determinism: designed for multi-tenant deployments with deterministic startup and per-tenant voice consistency.
  • Use Case: a company’s chatbot responds in Hungarian with natural-sounding speech, delivered to customers through a browser or app.

Quick Start

Configure the Piper voice parameters via PIPER_VOICE and PIPER_VOICE_JSON, start the FastAPI server, then POST text to /speak to obtain spoken output.

Frequently Asked Questions about tts-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Hungarian text-to-speech to a multi-tenant FastAPI app?

Hungarian text-to-speech in a multi-tenant FastAPI app is provided by exposing a /speak endpoint with ONNX-backed synthesis. It loads Piper voice models to deliver per-tenant speech synthesis from a single shared deployment.

Can I use Piper ONNX models for real-time voice synthesis in Python?

Piper ONNX models are used for real-time voice synthesis by loading PiperVoice from configured ONNX and JSON file paths. The FastAPI service processes text requests and returns base64 audio or binary WAV responses.

What environment variables are required to configure a Piper voice FastAPI service?

Configuring a Piper voice FastAPI service requires the PIPER_VOICE, PIPER_VOICE_JSON, and TTS_DEVICE environment variables. These parameters load the ONNX model and JSON config to ensure deterministic startup and per-tenant voice consistency.

How do I deploy a shared TTS service for multiple tenants with consistent voices?

A shared TTS service for multiple tenants with consistent voices is deployed via a FastAPI server with per-tenant voice configuration. It uses Piper ONNX models controlled by environment variables to maintain deterministic synthesis across tenants.

Does the Piper Hungarian TTS service return base64 audio or binary WAV files?

The Hungarian TTS service returns both base64 audio payloads and binary WAV files through its /speak endpoint. This allows flexible integration for chatbots delivering spoken responses through web browsers or mobile apps.

Are there limitations when using ONNX-backed voice synthesis for multi-tenant platforms?

ONNX-backed voice synthesis for multi-tenant platforms requires the Piper library and correctly configured voice model paths. It is specifically designed for Hungarian language synthesis and depends on environment variables for deterministic runtime behavior.