open-edge-platform/edge-ai-libraries/text-to-speech-dev

Claude Code and agent skill by open-edge-platform/edge-ai-libraries

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Build, configure, deploy, and operate the Text To Speech microservice. Use this skill when a developer or operator wants to: run the service with Docker Compose or on the host; build the image from source; select a TTS model (Kokoro, SpeechT5 — Qwen3-TTS currently cannot run on any device due to a dependency conflict) and its runtime/device/precision; wire Docker volumes and `/dev/dri` GPU passthrough; tune `config.yaml` and `TEXT_TO_SPEECH__...` overrides; or debug a startup, permission, GPU-v…

Install

npx vskill@latest install open-edge-platform/edge-ai-libraries/text-to-speech-dev

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as open-edge-platform/edge-ai-libraries/text-to-speech-dev.

Text To Speech Developer Skill

Help developers and operators build, configure, deploy, and troubleshoot the Text To Speech microservice.

Codebase root: microservices/text-to-speech/

When to Use

  • Deploying the service with Docker Compose (prebuilt image or local build)
  • Running the service directly on the host with a Python virtualenv
  • Choosing a TTS model (Kokoro, SpeechT5, or Qwen3-TTS) and its

runtime/device/precision

  • Wiring GPU device passthrough (/dev/dri, RENDER_GID)
  • Debugging a service that will not start, fails health checks, reports GPU

context errors, or raises permission errors on mounted volumes

  • Resolving a leftover container name conflict

Quick Facts

FactValue
Default port8011 (standalone and Docker both bind here)
Config fileconfig.yaml, same file for standalone and container runs
Config overridesTEXT_TO_SPEECH__<SECTION>__<KEY>=<value> environment variables
Container userUID/GID 1000:1000 (baked into the image — do not change)
Named volumestext_to_speech_models, text_to_speech_storage, text_to_speech_cache
Shipped default modelkokoro (ONNX runtime, CPU-only, runtime/device config ignored) — the docs' worked examples center on SpeechT5/Qwen, so confirm models.tts.name before assuming which model is active
Device supportCPU/GPU work for Kokoro and SpeechT5; NPU is accepted as a config/request value but non-functional for every model — see model-and-device-config.md for the per-model failure behavior
Known-broken modelsQwen3-TTS cannot run on any device (CPU/GPU/NPU) — fails at service startup due to a qwen-tts/transformers version conflict. SpeechT5 has no working PyTorch runtime (openvino only). Do not recommend deploying either gap as if it works.
Health checkGET /health → {"status": "ok"}

Reference Lookup

ReferenceWhen to read
deployment-architecture.mdCompose service topology, volumes, /dev/dri passthrough, config load order, image build vs. pull
model-and-device-config.mdKokoro/SpeechT5/Qwen model matrix, runtime/device/precision support, known GPU precision caveat
troubleshooting-deployment.mdPermission errors, GPU context failures, container name conflicts, slow first startup

Example Prompts

FileCovers
examples-prompts/docker-compose-deploy.mdStanding up the service with Docker Compose and verifying health
examples-prompts/switch-tts-model.mdSwitching between Kokoro and SpeechT5 (and why Qwen3-TTS can't be switched to yet)
examples-prompts/enable-gpu-acceleration.mdConfiguring OpenVINO GPU device passthrough end-to-end
examples-prompts/diagnose-qwen-dependency-failure.mdRecognizing the Qwen3-TTS/Parler-TTS startup dependency failures as known limitations

Architecture Summary

text-to-speech/
├── api/
│ ├── openai_endpoints.py ← POST /v1/audio/speech
│ ├── streaming_endpoints.py ← POST /v1/audio/speech/stream (SSE, phrase-level)
│ └── custom_endpoints.py ← /health, /v1/audio/voices, /v1/model-info, /v1/performance
├── pipeline.py ← orchestrates model load/warmup, speaker resolution, synthesis
├── components/
│ ├── tts/
│ │ ├── base.py / factory.py ← backend selection
│ │ ├── kokoro/ ← onnxruntime-based Kokoro backend
│ │ ├── openvino/ ← OpenVINO SpeechT5/Qwen backends (Qwen currently non-functional)
│ │ ├── pytorch/ ← PyTorch Qwen/Parler backend (no working PyTorch SpeechT5 path; Qwen/Parler non-functional)
│ │ └── speecht5_voices.py ← bundled SpeechT5 voice table
│ └── tts_component.py
├── utils/
│ ├── config_loader.py ← config.yaml + TEXT_TO_SPEECH__ env merge
│ ├── ensure_kokoro.py / ensure_parler.py / ensure_qwen.py / ensure_speecht5.py
│ └── session_manager.py / storage_manager.py / session_state_manager.py
├── config.yaml ← single source of truth for runtime behavior
├── docker-compose.yml ← service, volumes, /dev/dri mount, healthcheck
└── Dockerfile

Procedure: Deploying with Docker Compose

Read deployment-architecture.md first.

  1. From microservices/text-to-speech/, review config.yaml and set

models.tts.name/runtime/device/dtype as needed — this file is bind-mounted, so edits apply on docker compose restart.

  1. Copy .env.example to .env and set REGISTRY, RELEASE_TAG, and (for

GPU) RENDER_GID.

  1. Start the service:

``bash docker compose pull # or: docker compose build docker compose up -d ``

  1. Verify:

``bash curl --noproxy '*' http://127.0.0.1:8011/health ``

[!IMPORTANT]
The container always runs as UID/GID 1000:1000. Named volumes are
initialized with that ownership on first run — do not override user: in
Compose, and do not reuse volumes created by an older root-only run (see
the troubleshooting reference for the reset procedure).

Procedure: Choosing a Model, Runtime, and Device

Read model-and-device-config.md first.

Modelname valueRuntimeDeviceNotes
Kokorokokoroalways onnxruntime — runtime/device config ignoredCPU onlyShipped default; lightest-weight
SpeechT5microsoft/speecht5_ttsopenvino only (no working PyTorch implementation)CPU or GPUEnglish only, 7 bundled voices, rejects instructions
Qwen3-TTSQwen/Qwen3-TTS-12Hz-0.6B-CustomVoicen/an/a⚠️ Cannot currently run on any device — fails at startup with a qwen-tts/transformers dependency conflict. Do not deploy this until resolved; see model-and-device-config.md.
[!IMPORTANT]
dtype: int4 on integrated GPU is known to produce audible noise in the
synthesized output. fp16 on GPU is validated and performs well after
warmup. Do not recommend int4 for a GPU deployment without calling this
out.

Procedure: Building From Source or Running Standalone

  1. Docker build: docker compose build && docker compose up -d (tags the

same ${REGISTRY}/text-to-speech:${RELEASE_TAG} so later up calls reuse the local build), or docker build -t text-to-speech:local . directly.

  1. Standalone: install libsndfile1, create a venv, `pip install -r

requirements.txt, then python main.py (default bind 127.0.0.1:8011; override with TEXT_TO_SPEECH_SERVER_HOST / TEXT_TO_SPEECH_SERVER_PORT`).

  1. Sanity-check imports before starting standalone if startup fails

mysteriously: ``bash python -c "import fastapi, openvino, soundfile; print('imports-ok')" ``


Procedure: Debugging a Deployment Failure

Read troubleshooting-deployment.md for the full catalog. Quick diagnosis checklist:

bash
# 1. Is the container up and healthy?
docker compose ps
docker compose logs --tail 100 text-to-speech
# 2. Is port 8011 free, or is an old container holding the name?
ss -ltnp | grep 8011
docker rm -f text-to-speech # if "container name already in use"
# 3. GPU-specific: does the host expose the render node, and is RENDER_GID correct?
ls -l /dev/dri
stat -c '%g' /dev/dri/render* | head -1 # compare against .env RENDER_GID
# 4. Is this a permission problem on a reused volume?
docker compose exec text-to-speech id # expect uid=1000 gid=1000

Common root causes, roughly in likelihood order:

  • Leftover container with the same name from a previous run — remove it

explicitly rather than assuming Compose will resolve the conflict.

  • RENDER_GID not matching the host's actual render group GID — this is

host-specific and must never be hardcoded to a prior machine's value.

  • Named volumes initialized by an earlier root-only run — permission denied

under /app/text-to-speech/storage/....

  • GPU failure reported for SpeechT5 — test with device: CPU first,

then device: GPU; these are genuinely independent validations.

  • GPU/NPU failure reported for Qwen3-TTS — device isolation will not

help. Qwen3-TTS currently fails at startup with a dependency error (qwen-tts/transformers conflict) regardless of device; see model-and-device-config.md.

  • Proxy not forwarded into the container — model downloads time out even

though they work from the host.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
174
Repository forks
157
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/open-edge-platform/edge-ai-libraries/text-to-speech-dev/badge)](https://verified-skill.com/skills/open-edge-platform/edge-ai-libraries/text-to-speech-dev)

Something wrong with this skill or its page? Tell us.