Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RunEdgeAI/tts-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

154 Commits

Repository files navigation

Edge AI TTS Server

A real-time text-to-speech server with HTTP API and local audio playback.

Building

cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build build
cmake --install build

Requirements

  • CMake 3.26+
  • C++17 compiler
  • PortAudio (brew install portaudio on macOS, sudo apt install portaudio19-dev on Linux)

Running

./build/tts_server <model.onnx> <model.onnx.json> <espeak-ng-data>

The server listens on http://0.0.0.0:9999.

API Endpoints

Speak Text (with local playback)

# Speak immediately
curl -X POST http://localhost:9999/ -d "Hello world"
# Stream text (buffers until punctuation)
curl -X POST http://localhost:9999/stream -d "Hello, "
curl -X POST http://localhost:9999/stream -d "world."
curl -X POST http://localhost:9999/flush
# Cancel playback
curl -X POST http://localhost:9999/cancel

Synthesize to File

curl -X POST http://localhost:9999/synthesize -d "Hello world" -o output.raw
# Convert to MP3
ffmpeg -f f32le -ar 22050 -ac 1 -i output.raw output.mp3

License

Copyright (c) 2026 Edge AI, LLC. All rights reserved.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /