Skip to content
base-headPublic

About

An offline, open-source TTS-STT pipeline providing voice-controlled and text-to-speech capabilities on macOS with Whisper and Coqui. Optionally features a web UI.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Babel - Multi-lingual TTS System

Fast text-to-speech with GPU acceleration, voice cloning, and 1100+ languages.

License: MIT Python 3.11+

Quick Start

# Setup
./scripts/setup.sh
pip install -e .

# CLI
babel tts "Hello world"                # Quick TTS
babel voice                           # Voice control
babel serve                           # Start API (port 5003)

# Web UI
cd web-ui && npm run dev             # UI on port 3200

Features

  • Fast: 10ms cache hits, GPU-accelerated
  • 109 voices (VCTK) + 1100+ languages (Fairseq)
  • Web UI: Next.js interface with voice selector
  • CLI: Modern Click-based command interface
  • API: FastAPI server with GZip compression

Installation

# Clone and setup
git clone https://github.com/raintree-technology/babel.git
cd babel
./scripts/setup.sh

# Install as package
pip install -e .

Usage

CLI

# Text-to-speech
babel tts "Hello world"
babel tts "Hello" --speed 1.2 --speaker ED

# Voice control
babel voice --model base

# API server
babel serve --port 5003

# Utilities
babel benchmark
babel clean
babel --help

Python API

from babel_tts import OptimizedTTSClient

client = OptimizedTTSClient()
wav_bytes = client.generate_wav_bytes("Hello", speaker="ED")
client.speak("Hello world", speed=1.0)

HTTP API

# Start server
babel serve

# Generate speech
curl -X POST http://localhost:5003/api/tts \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello", "speaker": "ED", "speed": 1.0}'

Requirements

  • macOS (Apple Silicon or Intel) or Linux
  • Python 3.11+
  • 2GB RAM, 3GB disk

Structure

babel/
├── src/babel_tts/        # Python package
│   ├── tts/              # TTS engines
│   ├── stt/              # Speech-to-text
│   ├── api/              # FastAPI server
│   ├── voice/            # Voice control
│   └── cli/              # CLI commands
├── web-ui/               # Next.js frontend
├── scripts/              # Setup & utilities
├── docs/                 # Documentation
└── pyproject.toml        # Package config

Models

  • VCTK: 109 English voices (default)
  • FastPitch: Fastest single voice
  • Fairseq: 1100+ languages

Performance

  • Cold generation: ~1.3s
  • Cached: <20ms (126x faster)
  • GPU: Apple Silicon MPS + CUDA
  • Cache: Dual LRU (audio + WAV bytes)

Documentation

License

MIT License - See LICENSE for details.

Third-party components:

  • Coqui TTS: MPL 2.0
  • faster-whisper: MIT
  • CTranslate2: MIT

About

An offline, open-source TTS-STT pipeline providing voice-controlled and text-to-speech capabilities on macOS with Whisper and Coqui. Optionally features a web UI.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages