OmniVoice is a state-of-the-art zero-shot multilingual TTS model supporting more than 600 languages. Built on a novel diffusion language model architecture, it generates high-quality speech with superior inference speed, supporting voice cloning and voice design.
- zero-shot TTS, 600+ languages!
- single-stage arch based on Qwen3-0.6B;
- fast inference;
- beats ElevenLabs v2;
OmniSpeech Server is an HTTP server for text-to-speech (TTS) generation using OmniVoice. It provides a simple and efficient REST API that allows applications, scripts, automation pipelines, and backend services to convert text into speech and receive the generated audio in WAV format.
The server is designed to make speech synthesis easier to deploy, easier to consume, and easier to integrate into real-world environments. Instead of embedding model loading and inference logic into each individual application, OmniSpeech Server centralizes the TTS process in a single service. The model is loaded once at startup and remains available in memory, allowing clients to send requests and receive speech output through a clean HTTP interface.
This approach makes the project especially useful for developers and teams who want a reusable voice generation service that can be shared across multiple systems.
Alessandro de Oliveira Faria (A.K.A. CABELO)
This project is licensed under the MIT License.
- HTTP REST API for text-to-speech generation
- OmniVoice-based speech synthesis
- Model loaded only once during server startup
- Direct
audio/wavresponse - Optional WAV saving on the server filesystem
- CUDA support for GPU acceleration
- Health check endpoint for monitoring
- Easy integration with
curl, Python, and automation scripts - Clean architecture for backend and service-based deployments
- Simple and practical interface for local or remote usage
OmniSpeech Server was built to turn speech generation into a reusable service. In many real-world scenarios, developers do not want to place model initialization and inference logic inside every script or application. Instead, they need a stable server that receives text, synthesizes speech, and returns audio through a predictable API.
By exposing OmniVoice through HTTP, OmniSpeech Server offers several practical advantages:
- simpler deployment
- centralized inference
- reduced code duplication
- easier automation
- language-agnostic integration
- straightforward testing with HTTP tools
- easier operation in development and production environments
This makes it suitable for both experimentation and operational use.
OmniSpeech Server can be used in many scenarios, including:
- AI assistants with spoken responses
- chatbots with audio output
- accessibility tools
- automation scripts
- notification systems
- backend voice services
- educational tools
- monitoring systems with spoken alerts
- home automation
- IVR and speech-enabled prototypes
- local AI voice infrastructure
At a high level, OmniSpeech Server follows a simple workflow:
- the server starts
- the OmniVoice model is loaded into memory
- a client sends a POST request with text and optional generation parameters
- the server generates speech
- the waveform is converted to WAV
- the audio is returned to the client or saved on disk
This design keeps the service efficient, reusable, and easy to integrate.
- Python 3.10+
- PyTorch
- torchaudio
- Flask
- NumPy
- OmniVoice
- NVIDIA GPU with CUDA support recommended for best performance
git clone https://github.com/cabelo/OmniSpeechServer
cd OmniSpeechServer
python3 -m venv .venv
source .venv/bin/activate
pip install torch==2.8.0+cu128 torchaudio==2.8.0+cu128 --extra-index-url https://download.pytorch.org/whl/cu128
pip install flask numpy omnivoice
export HF_TOKEN=[your-token]
Start the server with:
python3 omnivoice_http_server.py --device cuda:0Or specify host and port explicitly:
python3 omnivoice_http_server.py --host 0.0.0.0 --port 5000 --device cuda:0GET /healthSimple health check endpoint.
curl http://localhost:5000/health{"status":"ok"}Generate speech from text.
| Field | Type | Required | Description |
|---|---|---|---|
text |
string | yes | Text to convert into speech |
instruct |
string | no | Speaker or style instruction |
language |
string | no | Language code such as pt |
save_path |
string | no | Save WAV file on the server filesystem |
curl -s -X POST \
-H 'Content-Type: application/json' \
-d '{"text":"Boa noite Gabriel! Aqui é Topzeira!","instruct":"male, low pitch, american accent","language":"pt"}' \
http://localhost:5000/tts | aplaycurl -s -X POST \
-H 'Content-Type: application/json' \
-d '{"text":"Olá! Este áudio foi gerado pelo OmniSpeech Server.","instruct":"male, low pitch, american accent","language":"pt"}' \
http://localhost:5000/tts -o out.wavcurl -s -X POST \
-H 'Content-Type: application/json' \
-d '{"text":"Este arquivo será salvo no disco do servidor.","instruct":"male, low pitch, american accent","language":"pt","save_path":"/tmp/out.wav"}' \
http://localhost:5000/tts{
"status": "saved",
"path": "/tmp/out.wav",
"sample_rate": 24000
}import requests
url = "http://localhost:5000/tts"
payload = {
"text": "Olá! Este é um teste de voz com OmniSpeech Server.",
"instruct": "male, low pitch, american accent",
"language": "pt"
}
response = requests.post(url, json=payload)
if response.status_code == 200:
with open("output.wav", "wb") as f:
f.write(response.content)
print("Audio saved as output.wav")
else:
print("Error:", response.status_code, response.text){
"text": "A declaração de Pedro após a sua vitória sobre o adversário deve ultrapassar o campo esportivo e deve chegar ao Superior Tribunal de Justiça Desportiva.",
"instruct": "Male, elderly, very low pitch, portuguese accent",
"language": "pt"
}{
"error": "field 'text' is required"
}