CoolFace
Apppublic

shakeeb08/youtube-to-roman-urdu

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes
App README

๐ŸŽง YouTube to Roman Urdu Converter

An AI-powered web application that converts Urdu and English YouTube videos into Roman Urdu using Speech Recognition and Large Language Models.

๐Ÿ”— Live App: https://huggingface.co/spaces/shakeeb08/youtube-to-roman-urdu


๐Ÿš€ Project Overview

This application automates the following pipeline:


YouTube URL
โ†“
Audio Extraction (yt-dlp)
โ†“
Speech-to-Text (Whisper ASR)
โ†“
LLM Processing (Gemini)
โ†“
Roman Urdu Transcript Output

The system supports:

  • โ€”Urdu audio โ†’ Roman Urdu
  • โ€”English audio โ†’ Roman Urdu

๐Ÿง  Core Features

  • โ€”โœ… Automatic language detection (Urdu / English)
  • โ€”โœ… Chunk-based LLM processing to avoid token overflow
  • โ€”โœ… Clean, interactive Streamlit interface
  • โ€”โœ… Modular architecture (downloader, transcriber, romanizer)
  • โ€”โœ… Secure API key management using environment variables
  • โ€”โœ… Docker-based deployment support

๐Ÿ— Architecture Design

The application follows a modular pipeline architecture:

1๏ธโƒฃ Downloader Module

  • โ€”Uses yt-dlp to extract audio from YouTube videos.

2๏ธโƒฃ Transcriber Module

  • โ€”Uses faster-whisper for efficient speech recognition.
  • โ€”Detects source language automatically.

3๏ธโƒฃ Romanizer Module

  • โ€”Uses Google Gemini LLM.
  • โ€”Converts:
  • โ€”Urdu script โ†’ Roman Urdu
  • โ€”English โ†’ Roman Urdu
  • โ€”Implements chunking to handle long transcripts safely.

โš™๏ธ Tech Stack

  • โ€”Python
  • โ€”Streamlit
  • โ€”faster-whisper
  • โ€”yt-dlp
  • โ€”Google Gemini API
  • โ€”Docker (for cloud deployment)

๐Ÿ“ธ Application Screenshots

๐Ÿ  Home Interface

Home Screenshot 1

Home Screenshot 2


๐Ÿ“ Sample Output (Roman Urdu Transcript)

Sample Output


๐Ÿ“ฆ Local Installation Guide

1๏ธโƒฃ Clone Repository

bash
git clone https://github.com/Sadat-Shakeeb/multilingual-youtube-transcriber.git
cd multilingual-youtube-transcriber

2๏ธโƒฃ Create Virtual Environment

bash
python -m venv yt_env
yt_env\Scripts\activate   # Windows

3๏ธโƒฃ Install Dependencies

bash
pip install -r requirements.txt

4๏ธโƒฃ Add Gemini API Key

Create a .env file:

GEMINI_API_KEY=your_api_key_here

5๏ธโƒฃ Run Application

bash
streamlit run app.py

๐ŸŒ Deployment Notes

The app has been deployed on Hugging Face Spaces.

While deploying, the following real-world constraints were encountered:

  • โ€”File watcher (inotify) limits on cloud infrastructure
  • โ€”JavaScript runtime requirements for yt-dlp
  • โ€”Network restrictions on some free-tier environments

These were addressed via:

  • โ€”Streamlit configuration tuning
  • โ€”Deployment strategy adjustments
  • โ€”Modular system redesign

๐ŸŽฏ Key Engineering Learnings

  • โ€”Handling cloud deployment limitations
  • โ€”Managing environment secrets securely
  • โ€”Designing chunk-based LLM pipelines
  • โ€”Separating data ingestion from ML processing
  • โ€”Debugging container health checks
  • โ€”Optimizing Whisper performance on CPU

๐Ÿ“Œ Resume-Ready Project Description

Multilingual AI web application that converts Urdu and English YouTube videos into Roman Urdu using Whisper ASR and Gemini LLM. Designed with chunk-based LLM processing to handle long transcripts and deployed using Streamlit with secure API key management.


๐Ÿ”ฎ Future Improvements

  • โ€”Direct audio file upload support
  • โ€”Support for additional languages
  • โ€”Migration to updated Gemini SDK
  • โ€”Improved transcription accuracy tuning
  • โ€”Background job processing for long videos

๐Ÿ“„ License

MIT License