Python Thai ASR
Project description
PyThaiASR
Python Thai Automatic Speech Recognition
PyThaiASR is a Python package for Automatic Speech Recognition with focus on Thai language. It have offline thai automatic speech recognition model.
License: Apache-2.0 License
Google Colab: Link Google colab
Model homepage: https://huggingface.co/airesearch/wav2vec2-large-xlsr-53-th
Install
pip install pythaiasr
For Wav2Vec2 with language model: if you want to use wannaphong/wav2vec2-large-xlsr-53-th-cv8-* model, you needs to install by the step.
pip install pythaiasr[lm]
pip install https://github.com/kpu/kenlm/archive/refs/heads/master.zip
Usage
from pythaiasr import asr
file = "a.wav"
print(asr(file))
API
asr(file: str, model: str = "airesearch/wav2vec2-large-xlsr-53-th")
- file: path of sound file
- model: The ASR model
- return: thai text from ASR
Options for model
- airesearch/wav2vec2-large-xlsr-53-th (default) - AI RESEARCH - PyThaiNLP model
- wannaphong/wav2vec2-large-xlsr-53-th-cv8-newmm - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer) + language model
- wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer) + language model
You can read about models from the list:
- airesearch/wav2vec2-large-xlsr-53-th - AI RESEARCH - PyThaiNLP model
- annaphong/wav2vec2-large-xlsr-53-th-cv8-newmm - Thai Wav2Vec2 with CommonVoice V8 (newmm tokenizer) + language model
- wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer) + language model
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pythaiasr-1.1.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for pythaiasr-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed39ac165d53f31f70b121f7f7dbe1add3a38459fc7a2d7d54b020e8974f6868 |
|
MD5 | 8d5a4b2b96f1510a7d56c58f4e3121e7 |
|
BLAKE2b-256 | 184b1f79f587ee8d3a875f94ab19b8c2635225b54464b6443f4d3e22caef8e39 |