Install the AI Noise Remover SDK
Python and FFmpeg on Windows, macOS and Linux, your first noise removal and the JavaScript build.
This guide runs the Urdu Sukhan ASR model on your own computer and transcribes your first Urdu recording with the tested scripts from the model’s GitHub repository. Choose one of the three formats: whisper.cpp for the command line and apps, faster-whisper or Transformers for Python.
Urdu Sukhan ASR
One project, three pages
All three formats give the same kind of results; the research report lists the scores of each runtime. The scripts were tested on macOS and Ubuntu 24.04 with Python 3.12.
The model is free for non-commercial use under the CC BY-NC 4.0 licence, and its files are shared on request:
Until then, every download in this guide fails with a 401 error. For commercial use, contact us.
Once your request is approved, you can try the model without installing anything in our
Colab notebook. It runs in your own Google Colab session, on a free GPU or the CPU: record from the microphone, upload a file or try the example clips, with the recommended settings built in. It needs a free Google account and your Hugging Face read token. Your audio goes to your Colab session on Google’s servers, never to Loudness.ai.
The model’s GitHub repository holds a tested script for each format in its examples folder. Download it and create a Python 3.12 virtual environment inside it. Use Python 3.12, the version the scripts were tested with: some of the packages have no ready-made builds for newer versions yet. On macOS, brew install python@3.12 adds it.
git clone https://github.com/Loudness-ai/urdu-sukhan-asr.git
cd urdu-sukhan-asr
python3.12 -m venv .venv
source .venv/bin/activateInstall the Hugging Face command line tool and log in with the read token from step 2; the scripts download the model with it:
python -m pip install huggingface_hub==2.2.0
hf auth loginThe scripts read WAV, FLAC, MP3 and OGG files. Convert other formats first, for example with FFmpeg:
ffmpeg -i recording.m4a -ar 16000 -ac 1 speech.wavYou need git, CMake and a C++ compiler. Then transcribe a file:
bash examples/whisper_cpp.sh speech.wavThe first run builds whisper.cpp v1.9.5 with a small patch that adds the -nsb switch, so that silence gives no text, and downloads the q8_0 model and the Silero voice detector into ~/urdu-sukhan-asr. Later runs start straight away. On an x86 server, choose the q4_0 file and the number of threads:
QUANT=q4_0 THREADS=8 bash examples/whisper_cpp.sh interview.mp3The script runs the Silero voice detector first, which can drop faint speech such as quiet English after Urdu. VAD=0 turns it off, and silence still gives no text:
VAD=0 bash examples/whisper_cpp.sh urdu-then-english.wavFrom ~/urdu-sukhan-asr, the script runs this command, which you can reuse in your own scripts:
whisper.cpp/build/bin/whisper-cli -m models/ggml/ggml-urdu-sukhan-asr-v1-q8_0.bin -l ur -t 8 -bs 5 -nt -mc 0 -nsb \
--vad -vm whisper.cpp/models/ggml-silero-v5.1.2.bin -vsd 2000 -vp 300 -f speech.wav-l ur sets the language (en for English); auto runs the encoder twice for each window.-bs 5 uses beam search, -nt leaves out timestamps and -mc 0 stops earlier text from carrying over.-nsb lets the model return nothing, so silence, noise and music give no text. In an app that uses the whisper.cpp library, set suppress_blank = false instead.--vad skips the parts without speech, and -vsd 2000 -vp 300 keep short pauses inside speech. The voice detector can also drop faint speech, such as quiet English after Urdu: if words are missing, run the script with VAD=0, or this command without --vad -vm … -vsd 2000 -vp 300. -nsb still gives no text on silence.Install faster-whisper and the libraries the script uses, in the versions it was tested with:
python -m pip install faster-whisper==1.2.1 ctranslate2==4.8.3 huggingface_hub==2.2.0 soundfile==0.14.0 soxr==1.1.0Then transcribe. The first run downloads only the CTranslate2 folder of the model:
python examples/transcribe_faster_whisper.py recording.wav
python examples/transcribe_faster_whisper.py lecture.flac --batch-size 8 --timestamps
python examples/transcribe_faster_whisper.py urdu-then-english.wav --no-vadThe Silero voice detector cuts the audio into speech pieces, which are transcribed in batches with beam 5 and without carried-over text. --no-vad turns the detector off for faint speech such as quiet English after Urdu, and silence still gives no text. The script uses int8 on a CPU and float16 on an NVIDIA graphics card; --threads sets the CPU threads (8 by default).
Install the tested versions of everything the scripts use, including Transformers and its torch dependency:
python -m pip install -r examples/requirements.txtThen transcribe. The first run downloads about 1.6 GB:
python examples/transcribe_transformers.py speech.wav
python examples/transcribe_transformers.py interview.flac --beams 5 --language urThe script uses an NVIDIA graphics card or the graphics processor of a Mac with Apple Silicon. Recordings longer than 30 seconds are cut into 30-second pieces and transcribed in batches. --beams 1 (the default) is the fastest; --beams 5 is slightly more accurate. On a CPU alone it is about ten times slower than real time: use whisper.cpp or faster-whisper there.
Use the -nsb switch of the patched whisper-cli, as the script does, or suppress_blank = false in the whisper.cpp library, and keep the voice detector on (--vad).
Set the language: auto-detection runs the encoder twice. On x86 servers, use the q4_0 file and about eight threads (QUANT=q4_0 THREADS=8). For long recordings, faster-whisper is the fastest. Transformers is about ten times slower than real time on a CPU.
Speech in English inside Urdu is written in English letters when it is clear; very faint English after Urdu can still come out in Urdu letters.
Names are the model’s weakest point. A prompt with the names you expect helps: add --prompt "Umair, Uzair, Tania" to the whisper-cli command.
Your access request has not been approved yet, or you are not logged in. Check the model page, then run hf auth login with a read token from the approved account.
The voice detector can drop faint speech, such as quiet English after Urdu. Turn it off with VAD=0 in the whisper.cpp script or --no-vad in the faster-whisper script; silence still gives no text.
Use Python 3.12, as in step 4. Newer Python versions have no ready-made builds of these packages yet.
Activate the virtual environment from step 4 and install the Hugging Face tool with python -m pip install huggingface_hub==2.2.0.
The scripts read WAV, FLAC, MP3 and OGG. Convert other formats with FFmpeg as in step 4.
Urdu Sukhan ASRThe model on Hugging FaceCode and results on GitHub
Try it in ColabHow the model was trained and tested
Python and FFmpeg on Windows, macOS and Linux, your first noise removal and the JavaScript build.
Python or JavaScript on Windows, macOS and Linux, first speech with subtitles, the speech server, Docker and offline use.
Read Open WebUI answers aloud with natural voices that run on your own machine.
Configure librechat.yaml so LibreChat reads messages aloud with free local voices.
Use AnythingLLM’s OpenAI Compatible provider with free voices on your own machine.