Skip to content

🎙️ Neural Voice Agent & Speech Synthesis (322 Voices) ​

LuxurAI features an ultra-low latency, studio-fidelity Neural Voice Engine. Powered by 322 neural voice models spanning 142 languages and regional locales, it delivers human-like speech synthesis with sub-second generation, zero GPU overhead, and direct speaker playback.

Whether you are building interactive voice agents, IVR telephony systems, automated video voiceovers, or streaming LLM conversational bots, the voice engine provides seamless real-time audio.


🌟 Key Highlights ​

  • 322 Neural Voice Models: Studio-grade natural acoustics across 142 languages and regional accents (Hindi, English, Spanish, French, German, Japanese, Chinese, Russian, Arabic, and 130+ more).
  • 142 Global Languages & Locales: Rich multilingual support including regional accents (e.g. hi-IN, en-IN, en-US, en-GB, es-ES, es-MX, ja-JP, zh-CN, fr-FR, de-DE, etc.).
  • Sub-Second Generation & 0% GPU Overhead: Highly optimized Edge-TTS and Cloudflare worker distribution ensures instant synthesis without expensive GPU compute.
  • Punctuation-Based Stream Chunking (type="chunk"): Real-time text-to-speech for streaming LLM outputs. Words are buffered locally and synthesized on sentence boundaries (., !, ?, ,, \n) for immediate continuous playback.
  • Zero-Dependency Speaker Playback: The Python SDK includes luxurai.voice.play() for native cross-platform speaker output without installing complex audio driver stacks.
  • In-Memory LRU Audio Cache: Identical phrases hit a sub-millisecond in-memory LRU cache, eliminating redundant network latency and coin charges on replay.
  • Transparent Duration-Based Billing: Charged at a flat ₹5.00 / hour (20.0 LC / hour) billed down to the millisecond of synthesized speech (approx. 0.0055 LC per second).

🏗️ Architectural Pipeline ​

mermaid
graph TD
    Client[Client App / Python SDK / Web] -->|HTTP POST /api/tts/speak| APIGate{API Key Gate}
    APIGate -->|Valid 'lxr_v1_...' Key| CacheCheck{In-Memory LRU Cache}
    APIGate -->|Missing / Invalid| RejectAuth[401 Unauthorized]
    
    CacheCheck -->|Cache HIT| ReturnCached[Return MP3 Audio (0ms)]
    CacheCheck -->|Cache MISS| ConcurrencyGuard[Asyncio Semaphore Guard (10 Concurrency)]
    
    ConcurrencyGuard --> CloudflarePrimary[Primary: Cloudflare Edge Worker]
    CloudflarePrimary -->|Success| SaveLRU[Cache in Memory + Deduct LC]
    CloudflarePrimary -->|Fail / Timeout / 429| DirectEdgeTTS[Secondary: Direct Edge-TTS Fallback]
    DirectEdgeTTS -->|Success| SaveLRU
    
    SaveLRU --> RecordHistory[Record in History & Hugging Face Storage]
    RecordHistory --> ReturnAudio[Stream Audio to Client + Response Headers]

🌐 Multilingual Voice Coverage (142 Languages) ​

The engine includes 322 unique voices covering diverse genders, regional dialects, and accents:

Locale CodeLanguage & RegionSample VoicesDefault Gender
hi-INHindi (India)hi-IN-SwaraNeural, hi-IN-MadhurNeuralFemale / Male
en-INEnglish (India)en-IN-NeerjaNeural, en-IN-PrabhatNeuralFemale / Male
en-USEnglish (United States)en-US-JennyNeural, en-US-ChristopherNeural, en-US-GuyNeural, en-US-AriaNeuralFemale / Male
en-GBEnglish (United Kingdom)en-GB-SoniaNeural, en-GB-RyanNeural, en-GB-LibbyNeuralFemale / Male
es-ES / es-MXSpanish (Spain / Mexico)es-ES-ElviraNeural, es-ES-AlvaroNeural, es-MX-DaliaNeuralFemale / Male
fr-FR / fr-CAFrench (France / Canada)fr-FR-DeniseNeural, fr-FR-HenriNeural, fr-CA-SylvieNeuralFemale / Male
de-DEGerman (Germany)de-DE-KatjaNeural, de-DE-ConradNeuralFemale / Male
ja-JPJapanese (Japan)ja-JP-NanamiNeural, ja-JP-KeitaNeuralFemale / Male
zh-CNChinese (Mandarin, Simplified)zh-CN-XiaoxiaoNeural, zh-CN-YunxiNeuralFemale / Male
ru-RURussian (Russia)ru-RU-SvetlanaNeural, ru-RU-DmitryNeuralFemale / Male
ar-SA / ar-EGArabic (Saudi Arabia / Egypt)ar-SA-ZariyahNeural, ar-SA-HamedNeural, ar-EG-SalmaNeuralFemale / Male
bn-IN / bn-BDBengali (India / Bangladesh)bn-IN-TanishaaNeural, bn-IN-BashkarNeuralFemale / Male
ta-IN / te-INTamil / Telugu (India)ta-IN-PallaviNeural, te-IN-ShrutiNeural, te-IN-MohanNeuralFemale / Male
mr-IN / gu-INMarathi / Gujarati (India)mr-IN-AarohiNeural, gu-IN-DhwaniNeuralFemale / Male
...and 125+ moreGlobal LocalesOver 322 voices available via the APIBoth Genders

⚡ Real-Time LLM Token Streaming (type="chunk") ​

One of the most powerful features of LuxurAI Voice is the ability to stream voice from an active LLM generation loop:

  1. As tokens stream in from Gemini, DeepSeek, or any LLM, the SDK buffers text.
  2. When punctuation (., !, ?, ,, ;, \n) is encountered, the completed sentence or phrase is immediately dispatched for audio synthesis.
  3. The resulting audio chunk begins playing through the user's speakers while the LLM continues generating the next phrase.
  4. This reduces initial speech latency from several seconds to under 400 milliseconds.
python
import luxurai

luxurai.LuxurKey = "lxr_v1_your_key_here"

# Simulated LLM token generator
def llm_tokens():
    for word in ["Welcome", " to", " LuxurAI.", " Voice", " streaming", " is", " now", " active!"]:
        yield word

# Plays each sentence chunk as soon as punctuation is detected
luxurai.voice.play(
    stream=llm_tokens(),
    type="chunk",
    gender="female",
    lang="en"
)

💰 Duration-Based Economic Model ​

Unlike legacy providers that bill by unpredictable character counts or rough word approximations, LuxurAI Voice bills strictly on synthesized audio duration:

$$\text{Cost (LC)} = \text{Duration (seconds)} \times \left(\frac{20 \text{ LC}}{3600 \text{ seconds}}\right) \approx \text{Duration (seconds)} \times 0.00555 \text{ LC}$$

  • Rate: ₹5.00 / hour (20.0 LC / hour).
  • Per-Second Cost: ~0.0055 LC (approx. ₹0.00138 per second of audio).
  • Billing Transparency: Every synthesis response returns X-Audio-Duration, X-LC-Charged, and X-LC-Balance HTTP headers.
  • Cache Hits: Identical synthesis queries served from the in-memory LRU cache are free and do not incur additional charges.

🔒 Privacy & Ghost Mode (store_voice=False) ​

By default, generated audio files are logged to user history and stored in secure cloud object storage for easy retrieval and replay.

If handling sensitive, confidential, or regulated data:

  • Set store_voice=False (in the Python SDK or via the API payload).
  • The server synthesizes and returns the raw MP3 audio stream directly without persisting the text or audio to the database or cloud storage.

Released under the MIT License.