Open-source Automatic Speech Recognition (ASR) pipeline for Bashkir (Bashkort), Kazakh, and Kyrgyz languages with deterministic orthography correction.
Python
2
119 commits
updated Sep 5, 2026
Open-source Automatic Speech Recognition (ASR) pipeline for Bashkir (Bashkort), Kazakh, and Kyrgyz languages with deterministic orthography correction.
Whisper's broad multilingual training allowed me to very quickly prototype an ASR to Kazakh text pipeline with the intention of improving language detection among Bashkir (ะะฐัากะพัั), Kazakh, and Kyrgyz. I was able to get my local setup using Whisper ASR to replicate similar sentence[s] seen on NoteGPT. While Whisper itself is not open-ended (it has a fixed objective), it could enable open-ended human-machine collaboration.
Application screenshots will be added during development







This project establishes infrastructure for Turkic language speech recognition. Its long-term utility depends on community engagement. We invite researchers, linguists, and developers to collaborate on refining the orthographic rules, testing the system with diverse audio data, and extending support to additional Turkic languages. Together, we can improve the accuracy and scope of these open-source tools.
| Language | Code | Status | Method |
|---|---|---|---|
| Bashkir | ba | โ Primary focus | Whisper (kk) + Orthography Correction |
| Kazakh | kk | โ Full support | Direct Whisper support |
| Kyrgyz | ky | โ Full support | Direct Whisper support |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Audio Input โ
โ (Bashkir/Kazakh/Kyrgyz) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Whisper ASR (OpenAI) โ
โ โข Bashkir โ use Kazakh (kk) model โ
โ โข Kazakh โ use Kazakh (kk) model โ
โ โข Kyrgyz โ use Kyrgyz (ky) model โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Deterministic Orthography Corrector โ
โ โข Character substitutions (าฑโั, ัโะธ, าโั
) โ
โ โข Selective preservation (า in specific words) โ
โ โข Context-aware variations (ะฑัะป/ะฑะธะป/ะฑัะด) โ
โ โข Word transformations (าะพะนัััาโาะพะนััะบ) โ
โ โข Processing time: <1ms โ
โ โข Reproducibility: ฯยฒ = 0 โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Language Classifier (Optional) โ
โ โข Trained on MMTEB TurkicClassification โ
โ โข Identifies: Bashkir/Kazakh/Kyrgyz โ
โ โข Quality assurance and verification โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Corrected Text Output โ
โ (Proper Bashkir orthography) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Open Foundations โ
โ Whisper (OpenAI) + MTEB (Community) โ
โ โ Open source, open weights โ
โ Global knowledge available to all โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Adaptation & Extension
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Our Open Contribution โ
โ โข Deterministic orthography corrector โ
โ โข Turkic language classifier โ
โ โข Complete documentation โ
โ โ MIT licensed, reproducible โ
โ Specialized tool for underserved community โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Community Access
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Democratized Access โ
โ Researchers โ Community members โ Linguists โ
โ Accessible to all regardless of institution or resourcesโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Python 3.8 or higher required
python --version
python -m venv turkic-env
or
python3 -m venv turkic-env
pip install openai-whisper scikit-learn pandas numpy
Transcribe Bashkir Audio:
cd scripts
python whisper_transcribe_and_correct.py ../audio/your_audio.m4a
Output files:
your_audio_original.txt - Raw Whisper output (Kazakh orthography)your_audio_corrected.txt - Final Bashkir text โญyour_audio_transcription_*.json - Full data with timestampsyour_audio_comparison_report.txt - Correction statisticsProcess with Specific Language:
# For Kazakh audio (no correction needed)
python whisper_transcribe_and_correct.py ../audio/kazakh_audio.m4a --language kk
# For Kyrgyz audio
python whisper_transcribe_and_correct.py ../audio/kyrgyz_audio.m4a --language ky
Turkic-Languages-Audio-to-Text-Transcription/
โโโ audio/ # Input audio files (.m4a, .wav, .mp3)
โโโ scripts/ # Main executable scripts
โ โโโ whisper_transcribe_and_correct.py # Main transcription pipeline
โ โโโ kazakh_to_bashkir_corrector.py # Orthography corrector
โ โโโ clean_vad_transcript.py # Transcript cleaning
โ โโโ train_sklearn_turkic.py # Train language classifier
โโโ output/ # Generated transcription results
โโโ project/
โ โโโ data/ # Training datasets (~16MB)
โ โ โโโ bashkir_clean_cyrillic_base.txt
โ โ โโโ kazakh_clean_cyrillic_base.txt
โ โ โโโ kyrgyz_clean_cyrillic_base.txt
โ โโโ docs/ # Documentation
โ โโโ training_scripts/ # Model training utilities
โ โโโ use_turkic_classifier.py
โ โโโ train_fasttext_turkic.py
โ โโโ train_transformer.py
โโโ training_data/ # Processed training samples
โ โโโ turkic_classifier.pkl # Trained classifier (596 KB)
โโโ turkic_classifier_full.pkl # Full-data model (596 KB)
โโโ LICENSE # MIT License
โโโ README.md # This file
git clone https://github.com/sp-squared/Turkic-Languages-Audio-to-Text-Transcription.git
cd Turkic-Languages-Audio-to-Text-Transcription
python -m venv turkic-env
or
python3 -m venv turkic-env
cd Turkic-Languages-Audio-to-Text-Transcription
source turkic-env/Scripts/activate
or
cd Turkic-Languages-Audio-to-Text-Transcription
source turkic-env/bin/activate
deactivate
pip install -r requirements.txt
Or manually:
pip install openai-whisper
pip install scikit-learn pandas numpy
pip install ffmpeg-python # For audio processing
pip install mteb
cd scripts
python -c "import whisper; print('Whisper installed successfully')"
cd scripts
python whisper_transcribe_and_correct.py ../audio/bashkir_speech.m4a
Expected output:
๐ค Loading audio: bashkir_speech.m4a
๐ฃ๏ธ Transcribing with Whisper (language: kk, model: base)...
โ
Transcription complete!
๐ Applying Bashkir orthography correction...
โ
Correction complete!
Files created:
- bashkir_speech_original.txt (Kazakh orthography)
- bashkir_speech_corrected.txt (Bashkir orthography) โญ
- bashkir_speech_comparison_report.txt
cd project/training-scripts
python use_turkic_classifier.py
Or in Python:
from use_turkic_classifier import classify_text
text = "ะะฐัากะพััะพััะฐะฝ ะ ะตัะฟัะฑะปะธะบะฐาปัะฝะดะฐ ัาฃั ะผำะบัำะฟ ะฐััะปะดั"
language, confidence, probabilities = classify_text(text)
print(f"Language: {language}") # Output: bashkir
print(f"Confidence: {confidence:.1%}") # Output: 98.5%
cd scripts
for file in ../audio/*.m4a; do
python whisper_transcribe_and_correct.py "$file"
done
# Tiny model (fastest, less accurate)
python whisper_transcribe_and_correct.py audio.m4a tiny kk
# Base model (recommended)
python whisper_transcribe_and_correct.py audio.m4a base kk
# Medium model (better accuracy)
python whisper_transcribe_and_correct.py audio.m4a medium kk
# Large model (best quality, slower)
python whisper_transcribe_and_correct.py audio.m4a large kk
ls -lh ~/Turkic-Languages-Audio-to-Text-Transcription/project/training_data/*.pkl
myfilesize=$(wc -c "BASHKIR_TXT_FILE_LOCATION" | cut -d ' ' -f1)
echo "The file size is $myfilesize bytes"
myfilesize=$(wc -c "KAZAKH_TXT_FILE_LOCATION" | cut -d ' ' -f1)
echo "The file size is $myfilesize bytes"
myfilesize=$(wc -c "/KYRGYZ_TXT_FILE_LOCATION" | cut -d ' ' -f1)
echo "The file size is $myfilesize bytes"
Test Set Performance: 97.3% accuracy
Cross-Validation: 100% accuracy (5-fold CV)
Test Accuracy: 97.3% โญ Training Accuracy: 99.8% Cross-Validation: 100.0% โน๏ธ โ For info only Model Size: 596 KB Inference Time: <1ms Reproducibility: 100%
โ REPORT: 97.3% test accuracy (proper evaluation) โน๏ธ NOTE: Cross-val shows embeddings are excellent
The deterministic corrector applies the following transformations:
Character Substitutions:
าฑ โ ั (Kazakh u to Bashkir u)ั โ ะธ (selective - preserves in words like ะผัะฝะตะฝ, ะฑััะณะต)า โ ั
(all occurrences)า โ ะบ/ั
(selective - preserves in words like าะฐัะผะฐั, าะพะนััะบ)Word-Level Transformations:
าะพะนัััา โ าะพะนััะบ (tail)ะผะตะฝะตะฝ โ ะผัะฝะตะฝ (with)Key Properties:
Trained on mteb/TurkicClassification dataset:
| Language | Method | Notes |
|---|---|---|
| Bashkir | Whisper (kk) + Corrector | Produces usable Bashkir text |
| Kazakh | Whisper (kk) | Direct support, high quality |
| Kyrgyz | Whisper (ky) | Direct support, high quality |
Example from real transcription:
| Property | This Project (Deterministic) | LLM-based (e.g., NoteGPT) |
|---|---|---|
| Reproducibility | 100% (ฯยฒ = 0) | ~20-30% (ฯยฒ โ 0.15) |
| Variance | 0.000 | 0.15-0.30 |
| Processing Time | <1ms | 500-2000ms |
| Cost per Use | $0 | $0.01-0.10 |
| Offline Capable | โ Yes | โ No |
| Transparency | โ Full (all rules visible) | โ Black box |
| Suitable For | Scientific research, production systems | General use, flexible tasks |
This project demonstrates the power of the Open Science movement by building on open foundations:
1. Whisper (OpenAI, 2022)
2. MMTEB (Research Community)
3. Standard Open Tools
Following open science principles, we contribute back:
This completes the open science cycle: we benefit from open resources and contribute back to the commons.
MIT License
Copyright (c) 2025 Colin Morris-Moncada
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
What this means:
This project uses:
Contributions are welcome! Here's how you can help:
Extend to Other Languages
Improve Correction Rules
Add Features
Documentation
Testing
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)Bashkir โ English Translation
Enhanced Language Detection
Extended Language Support
Improved Correction
Tools & Integrations
Whisper:
MMTEB:
Turkic Languages:
This project would not exist without:
Special thanks to all researchers working on low-resource language technology.
If you find this project useful, please consider giving it a star! It helps others discover this work.
@article{enevoldsen2025mmtebmassivemultilingualtext,
title={MMTEB: Massive Multilingual Text Embedding Benchmark},
author={Kenneth Enevoldsen and Isaac Chung and Imene Kerboua and Mรกrton Kardos and Ashwin Mathur and David Stap and Jay Gala and Wissam Siblini and Dominik Krzemiลski and Genta Indra Winata and Saba Sturua and Saiteja Utpala and Mathieu Ciancone and Marion Schaeffer and Gabriel Sequeira and Diganta Misra and Shreeya Dhakal and Jonathan Rystrรธm and Roman Solomatin and รmer รaฤatan and Akash Kundu and Martin Bernstorff and Shitao Xiao and Akshita Sukhlecha and Bhavish Pahwa and Rafaล Poลwiata and Kranthi Kiran GV and Shawon Ashraf and Daniel Auras and Bjรถrn Plรผster and Jan Philipp Harries and Loรฏc Magne and Isabelle Mohr and Mariya Hendriksen and Dawei Zhu and Hippolyte Gisserot-Boukhlef and Tom Aarsen and Jan Kostkan and Konrad Wojtasik and Taemin Lee and Marek ล uppa and Crystina Zhang and Roberta Rocca and Mohammed Hamdy and Andrianos Michail and John Yang and Manuel Faysse and Aleksei Vatolin and Nandan Thakur and Manan Dey and Dipam Vasani and Pranjal Chitale and Simone Tedeschi and Nguyen Tai and Artem Snegirev and Michael Gรผnther and Mengzhou Xia and Weijia Shi and Xing Han Lรน and Jordan Clive and Gayatri Krishnakumar and Anna Maksimova and Silvan Wehrli and Maria Tikhonova and Henil Panchal and Aleksandr Abramov and Malte Ostendorff and Zheng Liu and Simon Clematide and Lester James Miranda and Alena Fenogenova and Guangyu Song and Ruqiya Bin Safi and Wen-Ding Li and Alessia Borghini and Federico Cassano and Hongjin Su and Jimmy Lin and Howard Yen and Lasse Hansen and Sara Hooker and Chenghao Xiao and Vaibhav Adlakha and Orion Weller and Siva Reddy and Niklas Muennighoff},
publisher = {arXiv},
journal={arXiv preprint arXiv:2502.13595},
year={2025},
url={https://arxiv.org/abs/2502.13595},
doi = {10.48550/arXiv.2502.13595},
}
@article{muennighoff2022mteb,
author = {Muennighoff, Niklas and Tazi, Nouamane and Magne, Loรฏc and Reimers, Nils},
title = {MTEB: Massive Text Embedding Benchmark},
publisher = {arXiv},
journal={arXiv preprint arXiv:2210.07316},
year = {2022}
url = {https://arxiv.org/abs/2210.07316},
doi = {10.48550/ARXIV.2210.07316},
}
If you use this work in your research, please cite:
@software{Niklas_Muennighoff_Multilingual_Text_Embedding_Benchmark,
author = {Niklas Muennighoff},
license = {Apache-2.0},
title = {{MTEB: Massive Text Embedding Benchmark}},
url = {https://github.com/embeddings-benchmark/mteb}
year={2022}
note = {Multimodal toolbox for evaluating embeddings and retrieval systems}
}
@software{Colin_Morris_Moncada_Turkic_Languages_Audio_to_Text_Transcription,
author = {Colin Morris-Moncada},
license = {MIT},
title = {Turkic Languages Audio-to-Text Transcription:
Deterministic ASR Pipeline for Bashkir, Kazakh, and Kyrgyz},
year = {2025},
url = {https://github.com/sp-squared/Turkic-Languages-Audio-to-Text-Transcription},
note = {Open-source ASR pipeline with deterministic orthography correction}
}
105 commits
14 commits
Python
90.8%
Shell
9.2%
Open-source Automatic Speech Recognition (ASR) pipeline for Bashkir (Bashkort), Kazakh, and Kyrgyz languages with deterministic orthography correction.
Python
2
119 commits
updated Sep 5, 2026
Open-source Automatic Speech Recognition (ASR) pipeline for Bashkir (Bashkort), Kazakh, and Kyrgyz languages with deterministic orthography correction.
Whisper's broad multilingual training allowed me to very quickly prototype an ASR to Kazakh text pipeline with the intention of improving language detection among Bashkir (ะะฐัากะพัั), Kazakh, and Kyrgyz. I was able to get my local setup using Whisper ASR to replicate similar sentence[s] seen on NoteGPT. While Whisper itself is not open-ended (it has a fixed objective), it could enable open-ended human-machine collaboration.
Application screenshots will be added during development







This project establishes infrastructure for Turkic language speech recognition. Its long-term utility depends on community engagement. We invite researchers, linguists, and developers to collaborate on refining the orthographic rules, testing the system with diverse audio data, and extending support to additional Turkic languages. Together, we can improve the accuracy and scope of these open-source tools.
| Language | Code | Status | Method |
|---|---|---|---|
| Bashkir | ba | โ Primary focus | Whisper (kk) + Orthography Correction |
| Kazakh | kk | โ Full support | Direct Whisper support |
| Kyrgyz | ky | โ Full support | Direct Whisper support |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Audio Input โ
โ (Bashkir/Kazakh/Kyrgyz) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Whisper ASR (OpenAI) โ
โ โข Bashkir โ use Kazakh (kk) model โ
โ โข Kazakh โ use Kazakh (kk) model โ
โ โข Kyrgyz โ use Kyrgyz (ky) model โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Deterministic Orthography Corrector โ
โ โข Character substitutions (าฑโั, ัโะธ, าโั
) โ
โ โข Selective preservation (า in specific words) โ
โ โข Context-aware variations (ะฑัะป/ะฑะธะป/ะฑัะด) โ
โ โข Word transformations (าะพะนัััาโาะพะนััะบ) โ
โ โข Processing time: <1ms โ
โ โข Reproducibility: ฯยฒ = 0 โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Language Classifier (Optional) โ
โ โข Trained on MMTEB TurkicClassification โ
โ โข Identifies: Bashkir/Kazakh/Kyrgyz โ
โ โข Quality assurance and verification โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Corrected Text Output โ
โ (Proper Bashkir orthography) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Open Foundations โ
โ Whisper (OpenAI) + MTEB (Community) โ
โ โ Open source, open weights โ
โ Global knowledge available to all โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Adaptation & Extension
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Our Open Contribution โ
โ โข Deterministic orthography corrector โ
โ โข Turkic language classifier โ
โ โข Complete documentation โ
โ โ MIT licensed, reproducible โ
โ Specialized tool for underserved community โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Community Access
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Democratized Access โ
โ Researchers โ Community members โ Linguists โ
โ Accessible to all regardless of institution or resourcesโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Python 3.8 or higher required
python --version
python -m venv turkic-env
or
python3 -m venv turkic-env
pip install openai-whisper scikit-learn pandas numpy
Transcribe Bashkir Audio:
cd scripts
python whisper_transcribe_and_correct.py ../audio/your_audio.m4a
Output files:
your_audio_original.txt - Raw Whisper output (Kazakh orthography)your_audio_corrected.txt - Final Bashkir text โญyour_audio_transcription_*.json - Full data with timestampsyour_audio_comparison_report.txt - Correction statisticsProcess with Specific Language:
# For Kazakh audio (no correction needed)
python whisper_transcribe_and_correct.py ../audio/kazakh_audio.m4a --language kk
# For Kyrgyz audio
python whisper_transcribe_and_correct.py ../audio/kyrgyz_audio.m4a --language ky
Turkic-Languages-Audio-to-Text-Transcription/
โโโ audio/ # Input audio files (.m4a, .wav, .mp3)
โโโ scripts/ # Main executable scripts
โ โโโ whisper_transcribe_and_correct.py # Main transcription pipeline
โ โโโ kazakh_to_bashkir_corrector.py # Orthography corrector
โ โโโ clean_vad_transcript.py # Transcript cleaning
โ โโโ train_sklearn_turkic.py # Train language classifier
โโโ output/ # Generated transcription results
โโโ project/
โ โโโ data/ # Training datasets (~16MB)
โ โ โโโ bashkir_clean_cyrillic_base.txt
โ โ โโโ kazakh_clean_cyrillic_base.txt
โ โ โโโ kyrgyz_clean_cyrillic_base.txt
โ โโโ docs/ # Documentation
โ โโโ training_scripts/ # Model training utilities
โ โโโ use_turkic_classifier.py
โ โโโ train_fasttext_turkic.py
โ โโโ train_transformer.py
โโโ training_data/ # Processed training samples
โ โโโ turkic_classifier.pkl # Trained classifier (596 KB)
โโโ turkic_classifier_full.pkl # Full-data model (596 KB)
โโโ LICENSE # MIT License
โโโ README.md # This file
git clone https://github.com/sp-squared/Turkic-Languages-Audio-to-Text-Transcription.git
cd Turkic-Languages-Audio-to-Text-Transcription
python -m venv turkic-env
or
python3 -m venv turkic-env
cd Turkic-Languages-Audio-to-Text-Transcription
source turkic-env/Scripts/activate
or
cd Turkic-Languages-Audio-to-Text-Transcription
source turkic-env/bin/activate
deactivate
pip install -r requirements.txt
Or manually:
pip install openai-whisper
pip install scikit-learn pandas numpy
pip install ffmpeg-python # For audio processing
pip install mteb
cd scripts
python -c "import whisper; print('Whisper installed successfully')"
cd scripts
python whisper_transcribe_and_correct.py ../audio/bashkir_speech.m4a
Expected output:
๐ค Loading audio: bashkir_speech.m4a
๐ฃ๏ธ Transcribing with Whisper (language: kk, model: base)...
โ
Transcription complete!
๐ Applying Bashkir orthography correction...
โ
Correction complete!
Files created:
- bashkir_speech_original.txt (Kazakh orthography)
- bashkir_speech_corrected.txt (Bashkir orthography) โญ
- bashkir_speech_comparison_report.txt
cd project/training-scripts
python use_turkic_classifier.py
Or in Python:
from use_turkic_classifier import classify_text
text = "ะะฐัากะพััะพััะฐะฝ ะ ะตัะฟัะฑะปะธะบะฐาปัะฝะดะฐ ัาฃั ะผำะบัำะฟ ะฐััะปะดั"
language, confidence, probabilities = classify_text(text)
print(f"Language: {language}") # Output: bashkir
print(f"Confidence: {confidence:.1%}") # Output: 98.5%
cd scripts
for file in ../audio/*.m4a; do
python whisper_transcribe_and_correct.py "$file"
done
# Tiny model (fastest, less accurate)
python whisper_transcribe_and_correct.py audio.m4a tiny kk
# Base model (recommended)
python whisper_transcribe_and_correct.py audio.m4a base kk
# Medium model (better accuracy)
python whisper_transcribe_and_correct.py audio.m4a medium kk
# Large model (best quality, slower)
python whisper_transcribe_and_correct.py audio.m4a large kk
ls -lh ~/Turkic-Languages-Audio-to-Text-Transcription/project/training_data/*.pkl
myfilesize=$(wc -c "BASHKIR_TXT_FILE_LOCATION" | cut -d ' ' -f1)
echo "The file size is $myfilesize bytes"
myfilesize=$(wc -c "KAZAKH_TXT_FILE_LOCATION" | cut -d ' ' -f1)
echo "The file size is $myfilesize bytes"
myfilesize=$(wc -c "/KYRGYZ_TXT_FILE_LOCATION" | cut -d ' ' -f1)
echo "The file size is $myfilesize bytes"
Test Set Performance: 97.3% accuracy
Cross-Validation: 100% accuracy (5-fold CV)
Test Accuracy: 97.3% โญ Training Accuracy: 99.8% Cross-Validation: 100.0% โน๏ธ โ For info only Model Size: 596 KB Inference Time: <1ms Reproducibility: 100%
โ REPORT: 97.3% test accuracy (proper evaluation) โน๏ธ NOTE: Cross-val shows embeddings are excellent
The deterministic corrector applies the following transformations:
Character Substitutions:
าฑ โ ั (Kazakh u to Bashkir u)ั โ ะธ (selective - preserves in words like ะผัะฝะตะฝ, ะฑััะณะต)า โ ั
(all occurrences)า โ ะบ/ั
(selective - preserves in words like าะฐัะผะฐั, าะพะนััะบ)Word-Level Transformations:
าะพะนัััา โ าะพะนััะบ (tail)ะผะตะฝะตะฝ โ ะผัะฝะตะฝ (with)Key Properties:
Trained on mteb/TurkicClassification dataset:
| Language | Method | Notes |
|---|---|---|
| Bashkir | Whisper (kk) + Corrector | Produces usable Bashkir text |
| Kazakh | Whisper (kk) | Direct support, high quality |
| Kyrgyz | Whisper (ky) | Direct support, high quality |
Example from real transcription:
| Property | This Project (Deterministic) | LLM-based (e.g., NoteGPT) |
|---|---|---|
| Reproducibility | 100% (ฯยฒ = 0) | ~20-30% (ฯยฒ โ 0.15) |
| Variance | 0.000 | 0.15-0.30 |
| Processing Time | <1ms | 500-2000ms |
| Cost per Use | $0 | $0.01-0.10 |
| Offline Capable | โ Yes | โ No |
| Transparency | โ Full (all rules visible) | โ Black box |
| Suitable For | Scientific research, production systems | General use, flexible tasks |
This project demonstrates the power of the Open Science movement by building on open foundations:
1. Whisper (OpenAI, 2022)
2. MMTEB (Research Community)
3. Standard Open Tools
Following open science principles, we contribute back:
This completes the open science cycle: we benefit from open resources and contribute back to the commons.
MIT License
Copyright (c) 2025 Colin Morris-Moncada
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
What this means:
This project uses:
Contributions are welcome! Here's how you can help:
Extend to Other Languages
Improve Correction Rules
Add Features
Documentation
Testing
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)Bashkir โ English Translation
Enhanced Language Detection
Extended Language Support
Improved Correction
Tools & Integrations
Whisper:
MMTEB:
Turkic Languages:
This project would not exist without:
Special thanks to all researchers working on low-resource language technology.
If you find this project useful, please consider giving it a star! It helps others discover this work.
@article{enevoldsen2025mmtebmassivemultilingualtext,
title={MMTEB: Massive Multilingual Text Embedding Benchmark},
author={Kenneth Enevoldsen and Isaac Chung and Imene Kerboua and Mรกrton Kardos and Ashwin Mathur and David Stap and Jay Gala and Wissam Siblini and Dominik Krzemiลski and Genta Indra Winata and Saba Sturua and Saiteja Utpala and Mathieu Ciancone and Marion Schaeffer and Gabriel Sequeira and Diganta Misra and Shreeya Dhakal and Jonathan Rystrรธm and Roman Solomatin and รmer รaฤatan and Akash Kundu and Martin Bernstorff and Shitao Xiao and Akshita Sukhlecha and Bhavish Pahwa and Rafaล Poลwiata and Kranthi Kiran GV and Shawon Ashraf and Daniel Auras and Bjรถrn Plรผster and Jan Philipp Harries and Loรฏc Magne and Isabelle Mohr and Mariya Hendriksen and Dawei Zhu and Hippolyte Gisserot-Boukhlef and Tom Aarsen and Jan Kostkan and Konrad Wojtasik and Taemin Lee and Marek ล uppa and Crystina Zhang and Roberta Rocca and Mohammed Hamdy and Andrianos Michail and John Yang and Manuel Faysse and Aleksei Vatolin and Nandan Thakur and Manan Dey and Dipam Vasani and Pranjal Chitale and Simone Tedeschi and Nguyen Tai and Artem Snegirev and Michael Gรผnther and Mengzhou Xia and Weijia Shi and Xing Han Lรน and Jordan Clive and Gayatri Krishnakumar and Anna Maksimova and Silvan Wehrli and Maria Tikhonova and Henil Panchal and Aleksandr Abramov and Malte Ostendorff and Zheng Liu and Simon Clematide and Lester James Miranda and Alena Fenogenova and Guangyu Song and Ruqiya Bin Safi and Wen-Ding Li and Alessia Borghini and Federico Cassano and Hongjin Su and Jimmy Lin and Howard Yen and Lasse Hansen and Sara Hooker and Chenghao Xiao and Vaibhav Adlakha and Orion Weller and Siva Reddy and Niklas Muennighoff},
publisher = {arXiv},
journal={arXiv preprint arXiv:2502.13595},
year={2025},
url={https://arxiv.org/abs/2502.13595},
doi = {10.48550/arXiv.2502.13595},
}
@article{muennighoff2022mteb,
author = {Muennighoff, Niklas and Tazi, Nouamane and Magne, Loรฏc and Reimers, Nils},
title = {MTEB: Massive Text Embedding Benchmark},
publisher = {arXiv},
journal={arXiv preprint arXiv:2210.07316},
year = {2022}
url = {https://arxiv.org/abs/2210.07316},
doi = {10.48550/ARXIV.2210.07316},
}
If you use this work in your research, please cite:
@software{Niklas_Muennighoff_Multilingual_Text_Embedding_Benchmark,
author = {Niklas Muennighoff},
license = {Apache-2.0},
title = {{MTEB: Massive Text Embedding Benchmark}},
url = {https://github.com/embeddings-benchmark/mteb}
year={2022}
note = {Multimodal toolbox for evaluating embeddings and retrieval systems}
}
@software{Colin_Morris_Moncada_Turkic_Languages_Audio_to_Text_Transcription,
author = {Colin Morris-Moncada},
license = {MIT},
title = {Turkic Languages Audio-to-Text Transcription:
Deterministic ASR Pipeline for Bashkir, Kazakh, and Kyrgyz},
year = {2025},
url = {https://github.com/sp-squared/Turkic-Languages-Audio-to-Text-Transcription},
note = {Open-source ASR pipeline with deterministic orthography correction}
}
105 commits
14 commits
Python
90.8%
Shell
9.2%