honey126/VoxAI
๐๏ธ VoxAI Studio - AI Voice Cloning & Text-to-Speech
 
State-of-the-art voice cloning and text-to-speech platform powered by F5-TTS and E2-TTS models.
Clone any voice with just 3-10 seconds of audio and generate natural-sounding speech in seconds!
๐ Features
- ๐ฏ Zero-Shot Voice Cloning: Clone any voice with minimal audio samples (3-10 seconds)
- โก Fast Generation: GPU-accelerated inference for quick results
- ๐จ Dual Interface:
- Modern React web app with authentication and voice management
- Simple Gradio interface for quick testing
- ๐ User Management: JWT authentication with tier-based access
- ๐ Voice Library: Save and manage your voice clones
- ๐๏ธ Advanced Controls: Fine-tune speed, pitch, and other parameters
- ๐ Hybrid TTS: Supports both custom cloned voices and 31 standard voices via Google Gemini
๐ฎ How to Use
Option 1: React Web Interface (Recommended)
- Visit the main app at
/(root URL) - Register/Login to create your account
- Go to VoiceLab to upload voice samples:
- Record or upload 3-10 seconds of clear audio
- Provide accurate transcription
- Save to your voice library
- Go to Studio to generate speech:
- Select your cloned voice or a standard voice
- Enter the text you want to generate
- Click generate and download your audio!
Option 2: Gradio Interface (Quick Test)
- Visit `/gradio` for the simple interface
- Upload reference audio (3-10 seconds)
- Enter reference text (transcription of the audio)
- Enter generation text (what you want to say)
- Click Generate and listen to the result!
๐ API Endpoints
The FastAPI backend provides a full REST API:
POST /api/auth/register- Create accountPOST /api/auth/login- AuthenticatePOST /api/voices- Upload voice cloneGET /api/voices- List your voicesPOST /api/tts- Generate speechGET /docs- Full API documentation
๐ ๏ธ Technology Stack
Backend
- F5-TTS: Flow Matching-based TTS model for voice cloning
- E2-TTS: Enhanced emotional voice synthesis
- FastAPI: High-performance Python web framework
- SQLAlchemy: Database ORM with SQLite/PostgreSQL support
- JWT Authentication: Secure user authentication
- Gradio: Alternative simple UI
Frontend
- React 19: Modern component-based UI
- TypeScript: Type-safe development
- Vite: Lightning-fast build tool
- Google Gemini API: Standard voice TTS
AI/ML
- PyTorch: Deep learning framework
- Vocos/BigVGAN: Neural vocoders
- Conditional Flow Matching: Generative modeling
- Transformer Architecture: DiT, MMDiT, UNetT backbones
๐ก Usage Tips
For Best Results:
- Reference Audio Quality:
- Use clear, noise-free audio
- 3-10 seconds of speech
- Single speaker
- Good microphone quality
- Reference Transcription:
- Provide exact transcription
- Include punctuation
- Match the audio precisely
- Generation Text:
- Keep it reasonable length (< 500 chars recommended)
- Use proper punctuation for natural prosody
- Similar style to reference works best
- Speed Settings:
- Start with 1.0 (normal speed)
- Adjust between 0.5-2.0 for effect
- Slower speeds can improve quality
๐ฏ User Tiers
๐ง Environment Variables
For deployment, configure these variables:
# Server
PORT=7860
HOST=0.0.0.0
ENVIRONMENT=production
# Database
DATABASE_URL=sqlite:///./f5tts.db
# Authentication
SECRET_KEY=your-secret-key-here
ACCESS_TOKEN_EXPIRE_MINUTES=15
REFRESH_TOKEN_EXPIRE_DAYS=7
# CORS
CORS_ORIGINS=https://your-space.hf.space
# Optional: Google Gemini API
GEMINI_API_KEY=your-gemini-api-key๐ฆ Local Development
Prerequisites
- Python 3.10+
- Node.js 18+
- FFmpeg
- Git
Setup
- Clone the repository
git clone <your-repo-url>
cd E2-F5-TTS- Install Python dependencies
pip install -r requirements.txt- Install frontend dependencies
cd voxai-studio
npm install
npm run build
cd ..- Run the application
python hf_app.py- Access the app
- Main app: http://localhost:7860
- Gradio: http://localhost:7860/gradio
- API docs: http://localhost:7860/docs
๐ณ Docker Deployment
Build and run with Docker:
# Build the image
docker build -t voxai-studio .
# Run the container
docker run -p 7860:7860 voxai-studioFor Hugging Face Spaces:
Simply push this repository to your HF Space. The Dockerfile will handle everything automatically!
๐ Model Information
This application uses the F5-TTS (Flow Matching-based TTS) and E2-TTS models:
- Paper: F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching
- Original Repository: SWivid/F5-TTS
- License: MIT
Model Architecture:
- Conditional Flow Matching (CFM) for audio generation
- Transformer backbones (DiT, MMDiT, UNetT)
- Mel spectrogram intermediate representation
- Vocos/BigVGAN vocoder for high-quality audio
โ๏ธ License
MIT License - see LICENSE file for details
๐ Acknowledgments
- F5-TTS Team for the amazing voice cloning models
- Hugging Face for the Spaces platform
- FastAPI and React communities
- All contributors to this project
๐ Issues & Support
For issues, questions, or feature requests, please visit:
๐ Star History
If you find this project useful, please consider giving it a star! โญ
Made with โค๏ธ by the VoxAI Studio Team
Powered by F5-TTS, FastAPI, React, and Gradio
