(2/2) Build an ElevenLabs Clone: PyTorch, Next.js 15, AWS, Inngest, FastAPI, React, Tailwind (2025)

Andreas Trolle β€’ March 30, 2025
Video Thumbnail
Andreas Trolle Logo

Andreas Trolle

View Channel

About

Hi, my name is Andreas and I'm a Software Engineer from Denmark. I build complex and interesting full-stack projects from scratch and break them down for you to learn. My goal is to teach you coding to the best of my abilities. I have a bachelor's degree in SE and 5 years of industry experience.

Video Description

Source code: https://github.com/Andreaswt/elevenlabs-clone Part 1: https://www.youtube.com/watch?v=48A-E-xJPMo Discord & More: https://andreastrolle.com Inngest: https://innge.st/yt-andreas-1 Hi πŸ€™ In this video, you'll build a full-stack ElevenLabs clone with text-to-speech, voice conversion, and audio generation. Some tutorials would just call an API like ElevenLabs', but not us! Instead of external API services, you'll self-host three AI models (StyleTTS2, Seed-VC, and Make-An-Audio) from GitHub, fine-tune them to specific voices, then containerize them with Docker and expose inference endpoints via FastAPI. The AI backend will be built using Python and PyTorch. You'll create a Next.js application where users can use the AI models to generate audio, and also switch between voices and view previously generated audio files, stored in an S3 bucket. The project includes user authentication, a credit system, and an Inngest queue to prevent overloading of the server hosting the AI models. The web application is built on the T3 Stack with Next.js, React, Tailwind, and Auth.js. Follow along for the entire process from development to deployment. Features πŸ”Š Text-to-speech synthesis with StyleTTS2 🎭 Voice conversion with Seed-VC 🎡 Audio generation from text with Make-An-Audio πŸ€– Custom voice fine-tuning capabilities 🐳 Docker containerization of AI models πŸš€ FastAPI backend endpoints πŸ”„ Inngest queue to prevent server overload πŸ“Š User credit management system πŸ’Ύ AWS S3 for audio file storage πŸ‘₯ Multiple pre-trained voice models πŸ“± Responsive Next.js web interface πŸ” User authentication with Auth.js πŸŽ›οΈ Voice picker πŸ“ Generated audio history 🎨 Modern UI with Tailwind CSS πŸ’² Costs + How to follow along for free The total fine-tuning cost for both models is ~5-10 USD. When deploying the endpoint it’s ~1 USD per hour of uptime. S3 is really cheap. IAM roles, users etc are free. Following along for free: -When building the next.js application in part 2 of the video, I create a mock endpoint that means you don't have to host the AI models with EC2 unless you want to learn it. You can just use that mock endpoint throughout the video. -Don't fine-tune the models, but just use the model files (.pth) made by the researchers, as I also do before fine-tuning. -Don't create EC2 instances. They are the main cost driver. -S3 buckets are required for the voice-to-voice feature. If you want this feature, stay within the 5GB free tier. See more under storage and S3 here: https://aws.amazon.com/free -You can of course still follow the video, learn the concepts, and code along. You can also test the docker containers for training locally, without training the model, to learn as much as possible, without the actual fine-tuning. πŸ“– Chapters 00:00:00 Intro 00:04:08 Authentication 01:10:43 Dashboard beginning 01:18:57 Sidebar 02:10:45 Right sidebar 02:18:51 Voice selector 02:41:28 History 03:35:20 Playbar 04:34:04 Mobile settings 04:45:08 Text-to-speech page 05:10:58 Voice changer page 05:31:27 Text-to-SFX generate page 05:53:35 Text-to-SFX history page 06:06:08 Mock AI api 06:14:11 Queue and Throttling theory 06:22:24 Inngest implementation 06:39:38 Generate server actions 06:48:09 Generation status polling 07:06:36 Toast 07:24:21 Hook rest of pages up to API 07:29:48 Testing with EC2 AI deployment 07:46:16 Closing notes 07:47:02 Exercises for you

You May Also Like

Clone ElevenLabs: Build Essentials

AI-recommended products based on this video

Loading...
Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

(786)
$69.15$33.51
FREE delivery Jun 13 - 17
Loading...
Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

(0)
$30.99
FREE delivery Jun 19 - Jul 3
Loading...
Bonsai Starter Kit – 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters – Gardening Gifts for Women & Men
Best Seller

Bonsai Starter Kit – 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters – Gardening Gifts for Women & Men

(243)
$19.99
FREE delivery Sat, Jun 14 on your first order
300+ bought in past month
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
Seasonic Focus V4 GX-1000 (ATX3) - 1000W - 80+ Gold - ATX 3.0 & PCIe 5.1 Ready -Full-Modular -ATX Form Factor -Premium Japanese Capacitor -10 Year Warranty -Nvidia RTX 30/40 Super & AMD GPU Compatible

Seasonic Focus V4 GX-1000 (ATX3) - 1000W - 80+ Gold - ATX 3.0 & PCIe 5.1 Ready -Full-Modular -ATX Form Factor -Premium Japanese Capacitor -10 Year Warranty -Nvidia RTX 30/40 Super & AMD GPU Compatible

(22)
$423.35
FREE delivery Oct 8 - 10
Loading...
tomtoc 360Β° Protective Laptop Sleeve for 15-inch MacBook Air M4/A3241 2025, M3/A3114 2024, M2/A2941 2023, 15-inch MacBook Pro A1990 A1707, Dell XPS 15 Plus Laptop, Water-Resistant Computer Case Bag Global Recycled Standard

tomtoc 360Β° Protective Laptop Sleeve for 15-inch MacBook Air M4/A3241 2025, M3/A3114 2024, M2/A2941 2023, 15-inch MacBook Pro A1990 A1707, Dell XPS 15 Plus Laptop, Water-Resistant Computer Case Bag Global Recycled Standard

(12,968)
$39.55
FREE delivery Tue, Jun 17
Loading...
Replacement for Dell 130W Laptop Charger USB C - XPS 17 15 7590 9700 9500 9510 Precision 5560 3560 5540 5570 5550 3561 3550 5510 5520 Latitude 7410 7310 7210 Type C Computer AC Adapter Power Cord

Replacement for Dell 130W Laptop Charger USB C - XPS 17 15 7590 9700 9500 9510 Precision 5560 3560 5540 5570 5550 3561 3550 5510 5520 Latitude 7410 7310 7210 Type C Computer AC Adapter Power Cord

(1,131)
$45.98
FREE delivery Sun, Aug 24
100+ bought in past month
Loading...
MOSISO 360 Protective Laptop Bag 15 inch, 15 inch Computer Shoulder Bag Compatible with MacBook Air 15 M4 M3 M2 2025-2023, Dell XPS 15, Side Open Messenger Case &4 Zipper Pockets&Handle, Black Global Recycled Standard

MOSISO 360 Protective Laptop Bag 15 inch, 15 inch Computer Shoulder Bag Compatible with MacBook Air 15 M4 M3 M2 2025-2023, Dell XPS 15, Side Open Messenger Case &4 Zipper Pockets&Handle, Black Global Recycled Standard

(3,362)
$39.32
FREE delivery Tue, Jun 17
Loading...
45W 65W AC Adapter Laptop Charger for Dell Inspiron 15 14 13 17 3000 5000 7000 Series 5558 5559 Charger Latitude E6440 E6430 3520 3420 XPS 13 14 9333 9350 Notebook Dell Computer Power Supply Cord

45W 65W AC Adapter Laptop Charger for Dell Inspiron 15 14 13 17 3000 5000 7000 Series 5558 5559 Charger Latitude E6440 E6430 3520 3420 XPS 13 14 9333 9350 Notebook Dell Computer Power Supply Cord

(52)
$13.99
FREE delivery Sun, Aug 24 on your first order
100+ bought in past month