Skip to main content

Welcome to Resonance

The open-source alternative to ElevenLabs. Generate natural-sounding speech and clone voices instantly with AI-powered text-to-speech built on Next.js 16 and Chatterbox TTS.

Text-to-Speech
Natural AI voices
Voice Cloning
10s sample, instant clone
20 Built-in Voices
12 categories, 5 locales

Quick start

Get Resonance running locally in minutes

1

Clone and install dependencies

Clone the repository and install all required packages:
git clone https://github.com/code-with-antonio/resonance.git
cd resonance
npm install
2

Configure environment variables

Copy the example environment file and add your credentials:
cp .env.example .env.local
# Database (Prisma Postgres)
DATABASE_URL="postgresql://..."

# Chatterbox TTS (Modal)
CHATTERBOX_API_URL="https://your-modal-endpoint.modal.run"
CHATTERBOX_API_KEY="your-api-key"

# Clerk Authentication
CLERK_SECRET_KEY="sk_..."
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_..."

# Cloudflare R2
R2_ACCOUNT_ID="your-account-id"
R2_ACCESS_KEY_ID="your-access-key"
R2_SECRET_ACCESS_KEY="your-secret-key"
R2_BUCKET_NAME="your-bucket-name"

# Polar Billing
POLAR_ACCESS_TOKEN="your-polar-token"
POLAR_SERVER="sandbox"
POLAR_PRODUCT_ID="your-product-id"
3

Set up the database and deploy TTS engine

Run migrations and deploy the Chatterbox TTS model to Modal:
npx prisma migrate deploy
modal deploy chatterbox_tts.py
The Modal deployment runs on a serverless NVIDIA A10G GPU. First requests after inactivity may experience cold starts.
4

Seed voices and start the app

Populate the database with 20 built-in voices and start the development server:
npx prisma db seed
npm run dev
Open http://localhost:3000 to see Resonance in action.

Core features

Everything you need for production-ready text-to-speech

Text-to-Speech

Generate speech from text with adjustable creativity, variety, expression, and flow parameters

Voice Cloning

Upload or record a 10-second sample and clone any voice instantly with zero-shot learning

Voice Library

Browse 20 pre-seeded system voices and manage your custom cloned voices

Generation History

Access past generations with preserved voice metadata and waveform visualization

Multi-Tenant

Team-based access via Clerk Organizations with complete data isolation

Usage Billing

Pay-as-you-go character metering with configurable pricing via Polar

Ready to build with Resonance?

Follow the quickstart guide to get up and running in under 10 minutes

Get Started Now

Build docs developers (and LLMs) love