"Silence is better than interruptions." A zero-latency, real-time voice streaming and AI conversational engine built for the AROM Labs ecosystem.
Aro TTS is a production-grade infrastructure designed to facilitate real-time, bi-directional audio streaming between a client application and Large Language Models (LLMs). By utilizing persistent WebSockets instead of standard HTTP request/response cycles, Aro achieves true conversational AI capabilities, including natural "barge-in" interruptions and sub-second latency.
🚀 Core Architecture Aro is split into two highly optimized layers:
The Backend (Proxy Engine): Built with Python and FastAPI, this server opens a WebSocket connection with the user while simultaneously maintaining a live, asynchronous connection to Google's Gemini Multimodal Live API. It routes raw PCM audio bytes back and forth in real-time.
The Frontend (Client Interface): Built with Next.js (React) and TypeScript. It utilizes the browser's AudioContext and MediaRecorder APIs to capture microphone input in small, continuous chunks and stream them to the backend proxy without blocking the main UI thread.
✨ Features Zero-Latency Streaming: Audio is chunked and streamed instantly. No waiting for complete file generation before playback begins.
True Barge-In Mechanics: The system inherently understands when a user interrupts and gracefully stops the AI's current generation cycle.
Stateless Scaling: Deployed on Render, the backend acts as a lightweight proxy, meaning it doesn't require expensive heavy GPUs to run inference locally.
VRAM Optimized Routing: Leaves the heavy lifting to the LLM API, ensuring the local server footprint remains minimal.
🛠️ Installation & Setup Prerequisites Python 3.11+
Node.js & npm (for the frontend client)
Google Gemini API Key
- Backend Server Setup Clone the repository and spin up the FastAPI WebSocket engine:
Bash
git clone https://github.com/adi6206096675/aro-tts.git cd aro-tts/backend
pip install -r requirements.txt
export GEMINI_API_KEY="your_api_key_here"
uvicorn app:app --host 0.0.0.0 --port 8000 --reload The server will boot and begin listening for connections on ws://localhost:8000/v1/audio/stream.
- Frontend Client Setup To interact with the engine, boot up the React client:
Bash cd ../frontend
npm install
npm run dev Navigate to http://localhost:3000 to access the interactive workspace.
🔌 API Reference (WebSocket) Endpoint: wss://your-server-url/v1/audio/stream
Communication Protocol The WebSocket accepts and transmits raw binary data (arraybuffer).
Client to Server: Send microphone chunks captured via MediaRecorder every 100-250ms.
Server to Client: Receives continuous PCM audio byte chunks generated by the AI for immediate playback.
🧠 Engineered by AROM Labs Aro TTS is a core component of the AROM Ecosystem, designed and engineered by AROM Labs to push the boundaries of constraint-driven engineering and multi-model AI orchestration.
Explore the AROM Labs Workspace • View the Architecture Journey
📄 License This project is licensed under the MIT License - see the LICENSE file for details.