How jayantakol/ai_voice_agent works
Project type and purpose
• This is a full-stack AI Voice Generation Agent.
• Frontend: React + Vite + TypeScript (single‐page app).
• Backend: FastAPI (Python 3.10+) exposing a REST API.
• Purpose: allow users to upload a voice sample, clone it via ElevenLabs, and generate multilingual, age/gender-styled TTS.
File structure
• Top-level separation:
• client/ (React UI)
• server/ (FastAPI API + services)
• client/src/ui/components: UI is organized into step-components (upload, language, controls, etc.)
• server/models/schemas.py: Pydantic models for request/response data.
• server/services: business logic lives in:
• elevenlabs_client.py (wraps ElevenLabs API calls)
• audio_postprocess.py (DSP adjustments: pitch, speed, clarity)
• server/main.py: FastAPI app, routes for upload, clone, generate, and static file serving.
• ENV_EXAMPLE.txt + requirements.txt: configuration & dependencies.
README for additional insights
• REST API endpoints:
• POST /api/voice/upload
• POST /api/voice/clone
• POST /api/voice/generate
• GET /api/audio/{filename}
• Workflow: Upload → Clone → Generate → Serve audio
• Privacy: sample deletion, temp storage, cleanup needed
• Tech stack explicitly called out (React, FastAPI, Python, Node, ElevenLabs).