{"id":20457828,"url":"https://github.com/pythainlp/pythaiasr","last_synced_at":"2025-04-13T05:25:15.822Z","repository":{"id":56534494,"uuid":"366069880","full_name":"PyThaiNLP/pythaiasr","owner":"PyThaiNLP","description":"Python Thai Automatic Speech Recognition","archived":false,"fork":false,"pushed_at":"2023-03-19T05:05:58.000Z","size":182,"stargazers_count":66,"open_issues_count":4,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-26T22:11:11.513Z","etag":null,"topics":["asr","automatic-speech-recognition","hacktoberfest","hacktoberfest2022","thai-language","thai-nlp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyThaiNLP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-10T14:24:36.000Z","updated_at":"2025-02-19T05:12:18.000Z","dependencies_parsed_at":"2023-01-22T02:16:06.649Z","dependency_job_id":null,"html_url":"https://github.com/PyThaiNLP/pythaiasr","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fpythaiasr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fpythaiasr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fpythaiasr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2Fpythaiasr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyThaiNLP","download_url":"https://codeload.github.com/PyThaiNLP/pythaiasr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248667142,"owners_count":21142383,"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","hacktoberfest","hacktoberfest2022","thai-language","thai-nlp"],"created_at":"2024-11-15T12:09:22.572Z","updated_at":"2025-04-13T05:25:15.795Z","avatar_url":"https://github.com/PyThaiNLP.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyThaiASR\n\nPython Thai Automatic Speech Recognition\n\n \u003ca href=\"https://pypi.python.org/pypi/pythaiasr\"\u003e\u003cimg alt=\"pypi\" src=\"https://img.shields.io/pypi/v/pythaiasr.svg\"/\u003e\u003c/a\u003e\u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"/\u003e\u003c/a\u003e\u003ca href=\"https://pepy.tech/project/pythaiasr\"\u003e\u003cimg alt=\"Download\" src=\"https://pepy.tech/badge/pythaiasr/month\"/\u003e\u003c/a\u003e[![Coverage Status](https://coveralls.io/repos/github/PyThaiNLP/pythaiasr/badge.svg)](https://coveralls.io/github/PyThaiNLP/pythaiasr)\n\nPyThaiASR is a Python package for Automatic Speech Recognition with focus on Thai language. It have offline thai automatic speech recognition model.\n\nLicense: [Apache-2.0 License](https://github.com/PyThaiNLP/pythaiasr/blob/main/LICENSE)\n\nGoogle Colab: [Link Google colab](https://colab.research.google.com/drive/1zHt3GoxXWCaNSMRzE5lrvpYm9RolcxOW?usp=sharing)\n\nModel homepage: https://huggingface.co/airesearch/wav2vec2-large-xlsr-53-th\n\n## Install\n\n```sh\npip install pythaiasr\n```\n\n**For Wav2Vec2 with language model:**\nif you want to use wannaphong/wav2vec2-large-xlsr-53-th-cv8-* model with language model, you needs to install by the step.\n\n```sh\npip install pythaiasr[lm]\npip install https://github.com/kpu/kenlm/archive/refs/heads/master.zip\n```\n\n## Usage\n\n```python\nfrom pythaiasr import asr\n\nfile = \"a.wav\"\nprint(asr(file))\n```\n### API\n\n```python\nasr(data: str, model: str = _model_name, lm: bool=False, device: str=None, sampling_rate: int=16_000)\n```\n\n- data: path of sound file or numpy array of the voice\n- model: The ASR model\n- lm: Use language model (except *airesearch/wav2vec2-large-xlsr-53-th* model)\n- device: device\n- sampling_rate: The sample rate\n- return: thai text from ASR\n\n**Options for model**\n- *airesearch/wav2vec2-large-xlsr-53-th* (default) - AI RESEARCH - PyThaiNLP model\n- *wannaphong/wav2vec2-large-xlsr-53-th-cv8-newmm* - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer)\n- *wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut* - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer)\n\nYou can read about models from the list:\n\n- [*airesearch/wav2vec2-large-xlsr-53-th* - AI RESEARCH - PyThaiNLP model](https://medium.com/airesearch-in-th/airesearch-in-th-3c1019a99cd)\n- [*annaphong/wav2vec2-large-xlsr-53-th-cv8-newmm* - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer) + language model](https://huggingface.co/wannaphong/wav2vec2-large-xlsr-53-th-cv8-newmm) \n- [*wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut* - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer) + language model](https://huggingface.co/wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut)\n\n### Docker\nTo use this inside of Docker do the following:\n```sh\ndocker build -t \u003cYour Tag name\u003e .\ndocker run docker run --entrypoint /bin/bash -it \u003cYour Tag name\u003e\n```\nYou will then get access to a interactive shell environment where you can use python with all packages installed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fpythaiasr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythainlp%2Fpythaiasr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Fpythaiasr/lists"}