UrduNexus is a high-speed, AI-powered system that seamlessly converts Roman Urdu text into native Urdu script. Built using a fine-tuned ByT5 model, it features a self-contained architecture hosted on Google Colab, completely bypassing local hardware constraints and network blocks.
- Real-Time Transliteration: Converts Roman Urdu to native script instantly using a customized
google/byt5-smallmodel. - Smart Chunking: Automatically handles long paragraphs without hitting token limits.
- Voice Integration: Built-in Text-to-Speech (TTS) using Microsoft
edge-tts(ur-PK-UzmaNeural voice). - Self-Contained Architecture: The Python backend dynamically generates the HTML/CSS/JS frontend on the fly—no manual file uploads required.
- Unblockable Tunneling: Utilizes
bore.pubto expose the local Colab FastAPI server to the public web securely. - Glassmorphism UI: A beautiful, responsive, and modern web interface.
- Machine Learning: PyTorch, Hugging Face Transformers (
Maira26/UrduNexus-ByT5) - Backend: Python, FastAPI, Uvicorn
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Deployment: Google Colab T4 GPU, Bore.pub Tunneling
Because this project is designed to run on free cloud GPUs, installation is entirely automated.
- Open the
UrduNexus_Demo.ipynbnotebook in Google Colab. - Go to Runtime > Change runtime type and ensure T4 GPU is selected.
- Click Run All (or press
Ctrl + F9). - Wait 1-2 minutes for the system to install dependencies, load the model into VRAM, and spin up the tunnel.
- Click the public
bore.publink printed at the bottom of the cell to access the live web app!
- Frontend: User types Roman Urdu into the browser UI. JavaScript sends a
POSTrequest to the backend. - Backend Engine: FastAPI receives the text, chunks it into <180 character segments, and feeds it to the ByT5 model via PyTorch.
- Audio Generation: The native Urdu output is hashed and converted to an
.mp3usingedge-tts. - Response: The system returns the Urdu text and the relative path to the audio file, which the browser immediately displays and loads into the hidden audio player.