Skip to content

happyeric77/wyoming-cloud-tts

Repository files navigation

wyoming-cloud-tts

Wyoming Protocol TTS adapter for Home Assistant. It receives synthesize requests, segments Chinese/Japanese/English text, generates Azure multi-voice SSML, and returns 24 kHz 16-bit mono PCM audio.

Configuration

Copy .env.example to .env for local development.

Required:

  • AZURE_SPEECH_KEY
  • AZURE_SPEECH_REGION, default japaneast

Useful defaults:

  • WYOMING_PORT=10300
  • HEALTHCHECK_PORT=8080
  • LOG_LEVEL=info, supports debug, info, warn, error, silent
  • AZURE_REQUEST_TIMEOUT_MS=15000
  • VOICE_ZH=zh-TW-HsiaoChenNeural
  • VOICE_JA=ja-JP-NanamiNeural
  • VOICE_EN=en-US-AvaMultilingualNeural
  • DEFAULT_LANGUAGE=zh

Development

npm install
npm test
npm run build
npm start

Healthcheck endpoint:

curl http://127.0.0.1:8080/healthcheck

Docker

Build locally:

docker build -t wyoming-cloud-tts:dev .
docker run --rm -p 10300:10300 -p 8080:8080 --env-file .env wyoming-cloud-tts:dev

Install from GHCR:

docker pull ghcr.io/happyeric77/wyoming-cloud-tts:0.1.0
docker run -d \
  --name wyoming-cloud-tts \
  --restart unless-stopped \
  -p 10300:10300 \
  -p 8080:8080 \
  -e AZURE_SPEECH_KEY=your-key-here \
  -e AZURE_SPEECH_REGION=japaneast \
  ghcr.io/happyeric77/wyoming-cloud-tts:0.1.0

Verify container health:

curl http://127.0.0.1:8080/healthcheck

For Home Assistant Wyoming integration, point the service to:

  • host: the machine running this container
  • port: 10300

Audio Format

Azure is requested with riff-24khz-16bit-mono-pcm. The adapter strips the WAV/RIFF container and sends raw PCM via Wyoming audio-chunk events with:

  • rate: 24000
  • width: 2
  • channels: 1

About

Wyoming Protocol TTS adapter for Home Assistant. It receives `synthesize` requests, segments Chinese/Japanese/English text, generates Azure multi-voice SSML, and returns 24 kHz 16-bit mono PCM audio.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors