Sign inSign up

bariskisir/ema-lightning-api

By bariskisir

•Updated 3 days ago

Self-hosted Turkish text-to-speech API. One container, full and streaming synthesis.

Image
0

156

bariskisir/ema-lightning-api repository overview

ema-lightning-api logo

⁠ema-lightning-api

Self-hosted Turkish text-to-speech API. One container, full and streaming synthesis.

⁠Run

docker run -d --name ema-tts -p 9000:9000 -v ema-data:/data bariskisir/ema-lightning-api:1.0.1

With an API key (map to any host port with -p):

docker run -d --name ema-tts -p 8000:9000 -v ema-data:/data \
  -e API_KEY=change-me \
  bariskisir/ema-lightning-api:1.0.1

⁠API

Full WAV file:

curl -s -X POST localhost:9000/v1/speak \
  -H 'Content-Type: application/json' \
  -d '{"text":"Merhaba, size nasıl yardımcı olabilirim?","speed":1.0}' \
  --output hello.wav

Streamed raw PCM (float32 mono):

curl -s -N -X POST localhost:9000/v1/speak \
  -H 'Content-Type: application/json' \
  -d '{"text":"Uzun bir metin...","stream":true}' \
  --output out.pcm

Live playback over WebSocket (WS /v1/stream): client sends one JSON frame, server answers meta, binary PCM frames, then done.

⁠Parameters

FieldTypeDefaultDescription
textstring—Input text (required, no length limit).
speednumber1.0Speaking pace, min 0.25, max 4.
seedintegerrandomNon-negative seed; same input + seed = same audio.
sample_rateinteger48000One of 48000, 24000, 16000, 8000.
streambooleanfalsetrue returns chunked float32 PCM instead of WAV (HTTP only).

⁠Environment

VariableDefaultDescription
API_KEY(empty)Optional key; when unset there is no authentication.
DEVICEcpuCompute device: cpu, cuda or auto.
LOG_LEVELWARNINGDEBUG, INFO, WARNING, ERROR or CRITICAL.
LOG_TEXTSfalseStore input texts and request/response payloads. Audio is never stored.

Calls are logged to SQLite at /data/logs/calls.db (mount -v ema-data:/data).

⁠Sources

Apache-2.0

Tag summary

Content type

Image

Digest

sha256:b61be9082…

Size

341.4 MB

Last updated

3 days ago

docker pull bariskisir/ema-lightning-api