Skip to main content

Real-time speech generation from short to massive prompts in a single request — seamless and scalable, regardless of the length.

Project description

TTS Accelerator

Real-time natural speech generation — delivers real-time, natural speech from text in as little as 2-3 seconds, handling even extremely long sentences (16,000+ words) with instant voice output—no waiting or file saving.

This library works entirely in RAM to make speech super fast using the Edge-TTS engine. Edge-TTS sounds great, but it slows way down when you ask it to read long sentences—that was a big bottleneck for real-time apps. TTS Accelerator fixes that: it starts talking in just 2–3 seconds, even for thousands of words, by streaming audio straight from memory with no file saves or delays. Whether you’re building a chatbot or powering my AI assistant Nisha, who needs instant replies, this tool makes your app feel quick, smart, and alive.

PyPI version   Download

Built by Uday & Ranjit

Want to ask questions or share ideas?
👉   — we're active and friendly!

💡 Actively Developed & Maintained: This project is continuously improved with regular updates, bug fixes, and support. You're never alone — the journey keeps moving forward! 🚀🔧 GitHub Repo

Feel free to reach out, open issues, or suggest ideas — we’re building this together. 🤝

📧 Ranjit: ranjitdax89@gmail.com

📧 Uday: udaysubba2004@gmail.com


What Problem It Solves❓

Most TTS systems force you to wait while they generate the entire audio file — especially for long texts — before playback starts.

That’s slow, frustrating, and unusable for real-time apps.

TTS Accelerator solves this by streaming audio in real time.
It starts playback in just 2–3 seconds, even for huge texts. No disk I/O, no waiting — just seamless, instant voice output.
Perfect for:

  • Voice assistants
  • Chatbots
  • Narration tools
  • Live reading apps

📖 Quick Index

💡Insight

TTS Accelerator is designed for ultra-fast playback. Unlike typical TTS systems that wait for full audio generation, this one begins speaking within 2–3 seconds — even for texts up to 16,000+ words. It streams while generating, offering smooth, natural output with zero delay.

✨Key Features

  • Super Fast Speech (Real-Time TTS): Begins speaking in just 2–3 seconds, even for extremely long texts — up to 16,000+ words.
  • Highly Compatible: Seamlessly works with popular TTS engines like Edge-TTS (tested), Coqui TTS etc..
  • Streaming Playback: Audio starts playing instantly while it’s still being generated — no delay, no wait.
  • Minimal API: Just a single function call to start speaking — speak_text(text).
  • Zero-Delay Playback: Audio plays with zero delay, It is a smart system that uses fast RAM-based buffering and a separate producer-consumer pipeline to keep things smooth and super quick.

🧠Why we Made This Library

While working on our personal AI assistant, Nisha, we (Uday Subba & Ranjit Das) ran into a huge bottleneck:
Most TTS libraries either sounded robotic or took forever to generate long sentences — especially when trying to keep the voice natural.

We needed something fast enough for real-time conversation but still clear and human-like — and nothing we found was good enough.
That’s why we built TTS Accelerator.

It streams audio from text in just seconds, even for huge inputs, and it feels natural — exactly what Nisha needed to sound like a confident and responsive AI.

So yes — this library is not just an experiment, it powers a bigger dream.


Curious about my AI assistant Nisha?
She's the reason this library was born — and she's coming soon.
Stay tuned on GitHub or Discord for updates!

Meet Nisha – Your Bold AI AssistantGitHub Repo

🔧Installation

You can install it from PyPI by running the following command:

pip install tts-accelerator

Or you can install it from source:

pip install .

or

git clone https://github.com/RanjitDas-IN/tts-accelerator.git
cd tts-accelerator/example_uses
python basic_uses.py

Explore the TTS Accelerator Source Code

📚Examples

Simple Usage:

# Import the library
import tts_accelerator as tts

# Example long text to demonstrate real-time speech generation.
text = (
    "Imagine reading out a 1,000-word story or a chatbot message stream — "
    "normally, you'd wait several seconds or even minutes before hearing anything. "
    "But with tts-accelerator, audio playback begins in just 2–3 seconds, "
    "no matter how long the input is. It streams audio directly from RAM, "
    "without saving to disk, and keeps the voice natural and fluid throughout. "
    "This makes it perfect for assistants, narrators, or any real-time voice-based apps."
)

# Speak the text — playback starts almost instantly
tts.speak_text(text)
# it will generate the audio in less than 3 seconds regardless of number of lines in the 'text variable'

📦Requirements

  • Python v3.8+
  • A stable internet connection

📖Documentation

https://tts-accelerator.readthedocs.io/

🤝 Support & Contribution

Have questions or ideas to improve the project? We’re building this together!

We welcome bug reports, feature requests, or maybe a quick hello if you're enjoying the project!

Creators

Built and maintained by Uday Subba & Ranjit Das

Made with passion and precision.

📝License

This project is licensed under MIT.

CTA:

Try it now and tell us what you build!

🔮 About Nisha (Coming Soon)

Nisha is my personal AI assistant — sassy, smart, and ultra-fast.
She’s designed to handle real-time conversations with confidence and clarity, and tts-accelerator is one of the core techs that power her voice.

Want to follow her journey or be the first to try her out?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tts_accelerator-1.0.2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tts_accelerator-1.0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file tts_accelerator-1.0.2.tar.gz.

File metadata

  • Download URL: tts_accelerator-1.0.2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for tts_accelerator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 130d08f2830b2ef12e5a1df5f5e65bcb076b7c1facbe24f1045cbb1da90cf2a9
MD5 5fc827e946a01fe36a00abf3caf2417f
BLAKE2b-256 af2b203192bdc07753fba28197c3589da343b4af809c24f96b0d6777391ea3c1

See more details on using hashes here.

File details

Details for the file tts_accelerator-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tts_accelerator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 df38702ac41554c3fa810684ba7b98083258919408b021be8d6003521fcca53b
MD5 b03d9be8d6776521a59d8acfb227c572
BLAKE2b-256 890a8aa45d62aba3bdf6acdd4740bc9071408e38bd49ea51c92a51bfefee463e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page