Back to Projects
Voice Cloning & Audio Transcription Suite
CompletedFastAPIPythonOpenAI Whisper+9 more

Voice Cloning & Audio Transcription Suite

A FastAPI-powered application for speech-to-text transcription, Mel spectrogram visualization, and AI voice cloning.

Timeline

2 Weeks

Role

Full Stack Developer

Team

Solo

Status
Completed

Technology Stack

FastAPI
Python
OpenAI Whisper
ChatterboxTTS
RealtimeTTS
PyTorch
Librosa
NumPy
Matplotlib
HTML5
CSS3
JavaScript

Key Challenges

  • Integrating speech recognition and voice cloning into a unified application
  • Generating high-quality Mel spectrograms efficiently
  • Managing large AI model dependencies and audio processing performance

Key Learnings

  • Built production-ready FastAPI APIs for AI workloads
  • Gained experience working with Whisper and voice cloning models
  • Improved knowledge of audio processing and visualization using Librosa

Overview

Voice Cloning & Audio Transcription Suite is an AI-powered web application that combines speech recognition, voice cloning, and audio visualization into a single platform. It enables users to upload or record audio for transcription using OpenAI Whisper, generate Mel spectrograms for waveform analysis, and synthesize speech in a cloned voice using a reference audio sample.

The project was built to demonstrate practical applications of modern speech AI while providing an intuitive interface for experimenting with transcription and text-to-speech technologies. The application exposes REST APIs through FastAPI and offers a responsive frontend built with HTML, CSS, and JavaScript.


Key Features

Core Features

  • Speech-to-Text Transcription: Convert uploaded or recorded audio into accurate text using OpenAI Whisper.
  • Live Audio Recording: Record audio directly from the browser without requiring external software.
  • Voice Cloning: Generate speech that mimics a reference speaker using AI voice cloning models.
  • Mel Spectrogram Generation: Visualize audio frequency distributions after transcription.
  • Responsive Web Interface: Modern UI with audio playback, recording controls, and real-time feedback.

Tech Stack

Frontend

  • HTML5
  • CSS3
  • Vanilla JavaScript

Backend

  • FastAPI
  • Python
  • Uvicorn
  • OpenAI Whisper
  • ChatterboxTTS
  • RealtimeTTS

AI & Audio Processing

  • PyTorch
  • Torchaudio
  • Librosa
  • NumPy
  • Matplotlib

Deployment

  • Uvicorn
  • Python Virtual Environment

Architecture

The application follows a lightweight client-server architecture.

  • Browser records or uploads audio.
  • Frontend sends audio files to FastAPI endpoints.
  • Whisper processes speech and generates transcription.
  • Librosa extracts audio features and creates Mel spectrograms.
  • Voice cloning engine synthesizes speech using uploaded reference audio.
  • FastAPI returns transcription, spectrogram image, and generated audio to the client.

Major Challenges

Integrating Multiple AI Models

Running Whisper alongside voice cloning models required careful dependency management due to conflicting package versions and heavy PyTorch requirements.

Solution

Separated model initialization, optimized dependency versions, and configured the backend to load models efficiently while minimizing startup overhead.


Audio Processing Pipeline

Supporting microphone recording, uploaded files, transcription, visualization, and synthesized playback required handling multiple audio formats consistently.

Solution

Standardized the processing pipeline using FFmpeg for decoding and Librosa for feature extraction, ensuring compatibility across supported audio formats.


Managing Large Dependencies

Speech AI frameworks introduce significant installation complexity, especially with GPU and CPU-specific PyTorch builds.

Solution

Documented installation steps, added troubleshooting guidance, and maintained a clean requirements file to simplify project setup.


Performance Optimizations

  • Load AI models only once during application startup.
  • Efficient in-memory audio processing without unnecessary disk writes.
  • Optimized Mel spectrogram generation using Librosa.
  • Lightweight frontend with asynchronous API requests.
  • Fast response handling using FastAPI's asynchronous capabilities.

Security

  • Server-side input validation for uploaded files.
  • Multipart form validation for API requests.
  • Temporary file handling during audio processing.
  • Safe API responses without exposing server internals.

Future Improvements

  • Support streaming real-time transcription.
  • Add multilingual speech recognition.
  • Introduce user authentication and saved transcription history.
  • Enable multiple voice cloning models for quality comparison.
  • Dockerize the application for simplified deployment.
  • GPU acceleration configuration for faster inference.

What I Learned

  • Built scalable REST APIs using FastAPI for AI applications.
  • Integrated OpenAI Whisper into a production-style workflow.
  • Learned voice cloning concepts and speech synthesis pipelines.
  • Improved understanding of digital signal processing using Librosa.
  • Gained experience handling audio recording, playback, and visualization in web applications.
  • Learned best practices for managing AI model dependencies and deployment.

Connect

© 2026 Rishabh Dhawad. All rights reserved.