{"id":20526555,"url":"https://github.com/tugstugi/mongolian-speech-recognition","last_synced_at":"2025-04-14T04:20:26.229Z","repository":{"id":53599516,"uuid":"148290579","full_name":"tugstugi/mongolian-speech-recognition","owner":"tugstugi","description":"Mongolian speech recognition with PyTorch","archived":false,"fork":false,"pushed_at":"2021-03-22T05:28:05.000Z","size":168,"stargazers_count":133,"open_issues_count":3,"forks_count":52,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-27T18:12:16.612Z","etag":null,"topics":["asr","automatic-speech-recognition","convolutional-neural-networks","deep-learning","mongolian","python","pytorch","speech-recognition","speech-to-text"],"latest_commit_sha":null,"homepage":"https://www.chimege.mn/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tugstugi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-11T09:08:58.000Z","updated_at":"2025-03-25T06:43:25.000Z","dependencies_parsed_at":"2022-09-11T07:20:29.082Z","dependency_job_id":null,"html_url":"https://github.com/tugstugi/mongolian-speech-recognition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tugstugi%2Fmongolian-speech-recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tugstugi%2Fmongolian-speech-recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tugstugi%2Fmongolian-speech-recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tugstugi%2Fmongolian-speech-recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tugstugi","download_url":"https://codeload.github.com/tugstugi/mongolian-speech-recognition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819631,"owners_count":21166512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asr","automatic-speech-recognition","convolutional-neural-networks","deep-learning","mongolian","python","pytorch","speech-recognition","speech-to-text"],"created_at":"2024-11-15T23:14:43.416Z","updated_at":"2025-04-14T04:20:26.206Z","avatar_url":"https://github.com/tugstugi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"An online demo trained with a Mongolian proprietary dataset (WER 8%): [https://chimege.mn/](https://chimege.mn/).\n\nIn this repo, following papers are implemented:\n* [QuartzNet: Deep Automatic Speech Recognition with 1D Time-Channel Separable Convolutions](https://arxiv.org/abs/1910.10261)\n* [An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition](https://arxiv.org/abs/1507.05717)\n  * speech recognition as optical character recognition\n\nThis repo is partially based on:\n* decoder from [SeanNaren/deepspeech.pytorch](https://github.com/SeanNaren/deepspeech.pytorch)\n* Jasper/QuartzNet blocks from [NVIDIA/NeMo](https://github.com/NVIDIA/NeMo)\n\n## Training\n1. Install PyTorch\u003e=1.3 with conda\n2. Install remaining dependencies: `pip install -r requirements.txt`\n3. Download the Mongolian Bible dataset: `cd datasets \u0026\u0026 python dl_mbspeech.py`\n4. Pre compute the mel spectrograms: `python preprop_dataset.py --dataset mbspeech`\n5. Train: `python train.py --model crnn --max-epochs 50 --dataset mbspeech --lr-warmup-steps 100`\n   * logs for the TensorBoard are saved in the folder `logdir`\n\n## Results\nDuring the training, the ground truth and recognized texts are logged into the TensorBoard.\nBecause the dataset contains only a single person, the predicted texts from the validation set\nshould be already recognizable after few epochs:\n\n**EXPECTED:**\n```\nаливаа цус хувцсан дээр үсрэхэд цус үсэрсэн хэсгийг та нар ариун газарт угаагтун\n```\n**PREDICTED:**\n```\nаливаа цус хувцсан дээр үсэрхэд цус усарсан хэсхийг та нар ариун газарт угаагтун\n```\n\nFor fun, you can also generate an audio with a Mongolian TTS and try to recognize it.\nThe following code generates an audio with the\n[TTS of the Mongolian National University](http://172.104.34.197/nlp-web-demo/)\nand does speech recognition on that generated audio:\n```\n# generate audio for 'Миний төрсөн нутаг Монголын сайхан орон'\nwget -O test.wav \"http://172.104.34.197/nlp-web-demo/tts?voice=1\u0026text=Миний төрсөн нутаг Монголын сайхан орон.\"\n# speech recognition on that TTS generated audio\npython transcribe.py --checkpoint=logdir/mbspeech_crnn_sgd_wd1e-05/epoch-0050.pth --model=crnn test.wav\n# will output: 'миний төрсөн нут мөнголын сайхан оөрулн'\n```\n\nIt is also possible to use a KenLM binary model. First download it from\n[tugstugi/mongolian-nlp](https://github.com/tugstugi/mongolian-nlp#mongolian-language-model).\nAfter that, install [parlance/ctcdecode](https://github.com/parlance/ctcdecode). Now you can transcribe with the language model:\n```\npython transcribe.py --checkpoint=path/to/checkpoint --lm=mn_5gram.binary --alpha=0.3 test.wav\n```\n\n## Contribute\nIf you are Mongolian and want to help us, please record your voice on [Common Voice](https://voice.mozilla.org/mn/speak).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftugstugi%2Fmongolian-speech-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftugstugi%2Fmongolian-speech-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftugstugi%2Fmongolian-speech-recognition/lists"}