Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tts-server

A small local HTTP server that speaks text through the computer's speakers using Piper and the included en_GB-alan-medium voice. It works offline after Nix has built the package.

Start it:

nix run path:.

Port 5000 is used by default. To choose another port:

nix run path:. -- --port 5001

The bundled Alan voice is used by default. To use another Piper model:

nix run path:. -- --model /absolute/path/to/voice.onnx

Both options can be combined:

nix run path:. -- --port 5001 --model /absolute/path/to/voice.onnx

Speak some text from another terminal:

curl -X POST http://127.0.0.1:5000/tts \
  -H 'Content-Type: application/json' \
  -d '{"text":"Hello from local text to speech."}'

The endpoint generates a temporary WAV, plays it with pw-play, then deletes it.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages