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, show_pad: bool = False, model: str = "airesearch/wav2vec2-large-xlsr-53-th")
- file: path of sound file
- show_pad: show [PAD] in output
- 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.0.1.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file pythaiasr-1.0.1.tar.gz
.
File metadata
- Download URL: pythaiasr-1.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34c838664f7dcbef671abcbed68abd2eb88d7abfb675927abc4f740eb098010f |
|
MD5 | f4dde569c0f0975588dba30b66e45ec3 |
|
BLAKE2b-256 | 39232a17eea63bd05c5f1b847feba9a96df470cd4b16eaffe34f919ba78adff7 |
Provenance
File details
Details for the file pythaiasr-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pythaiasr-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb4363d76e6528f70485056b546491546138c2238cf7b79e31897db46a66be47 |
|
MD5 | 05af833c647d3e6cfb82661763bb7936 |
|
BLAKE2b-256 | c9650908fffbbeb5087489ddeed8dd1702ab976ef89f6440e2ea50db07aa1e38 |