Skip to content

Releases: PyThaiNLP/pythaiasr

PyThaiASR v1.3.0

19 Mar 05:05
9cf64bd
Compare
Choose a tag to compare

Changelog

  • Add support GPU #12
  • Add input as waveform #11
  • Add test set #14

Python Thai Automatic Speech Recognition

pypiLicenseDownloadCoverage Status

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 with language 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(data: str, model: str = _model_name, lm: bool=False, device: str=None, sampling_rate: int=16_000)
  • data: path of sound file or numpy array of the voice
  • model: The ASR model
  • lm: Use language model (except airesearch/wav2vec2-large-xlsr-53-th model)
  • device: device
  • sampling_rate: The sample rate
  • 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)
  • wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut - Thai Wav2Vec2 with CommonVoice V8 (deepcut tokenizer)

You can read about models from the list:

Docker

To use this inside of Docker do the following:

docker build -t <Your Tag name> .
docker run docker run --entrypoint /bin/bash -it <Your Tag name>

You will then get access to a interactive shell environment where you can use python with all packages installed.

Full Changelog: v1.2.0...v1.3.0

PyThaiASR v1.2.0

15 Oct 19:01
de40473
Compare
Choose a tag to compare

PyThaiASR is a Python package for Automatic Speech Recognition with focus on Thai language. It have offline thai automatic speech recognition model.

Now, It can use wannaphong/wav2vec2-large-xlsr-53-th-cv8- model without language model.

Upgrade by pip: pip install -U pythaiasr

What's Changed

New Contributors

  • @FinnKr made their first contribution in #9

Full Changelog: v1.1.2...v1.2.0

PyThaiASR v1.1.2

11 Aug 10:01
Compare
Choose a tag to compare
- remove replace space

PyThaiASR v1.1.1

11 Aug 09:57
Compare
Choose a tag to compare

PyThaiASR

Python Thai Automatic Speech Recognition

pypiLicenseDownload

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:

PyThaiASR v1.1.0

11 Aug 09:44
Compare
Choose a tag to compare

PyThaiASR

Python Thai Automatic Speech Recognition

pypiLicenseDownload

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:

PyThaiASR v1.0.1

11 Aug 09:35
Compare
Choose a tag to compare

PyThaiASR

Python Thai Automatic Speech Recognition

pypiLicenseDownload

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:

PyThaiASR v1.0.0

11 Aug 09:19
Compare
Choose a tag to compare

PyThaiASR

Python Thai Automatic Speech Recognition

pypiLicenseDownload

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:

PyThaiASR v0.3

15 Mar 13:29
83e0065
Compare
Choose a tag to compare

Change

  • Fixed #4

PyThaiASR

Python Thai Automatic Speech Recognition

pypiLicenseDownload

PyThaiASR is a Python package for Automatic Speech Recognition with focus on Thai language. It have offline thai automatic speech recognition model from Artificial Intelligence Research Institute of Thailand (AIResearch.in.th).

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

Usage

from pythaiasr import asr

file = "a.wav"
print(asr(file))

API

asr(file: str, show_pad: bool = False)
  • file: path of sound file
  • show_pad: show [PAD] in output
  • return: thai text from ASR

PyThaiASR v0.2

06 Sep 06:32
39d47d3
Compare
Choose a tag to compare

Change

  • Change model to airesearch/wav2vec2-large-xlsr-53-th #2 (Finetuning wav2vec2-large-xlsr-53 on Thai Common Voice 7.0)

PyThaiASR

Python Thai Automatic Speech Recognition

pypiLicenseDownload

PyThaiASR is a Python package for Automatic Speech Recognition with focus on Thai language. It have offline thai automatic speech recognition model from Artificial Intelligence Research Institute of Thailand (AIResearch.in.th).

License: Apache-2.0 License

Google Colab: Link Google colab

Model homepage: https://huggingface.co/airesearch/wav2vec2-large-xlsr-53-th

Install

pip install -e .

Usage

from pythaiasr import asr

file = "a.wav"
print(asr(file))

API

asr(file: str, show_pad: bool = False)
  • file: path of sound file
  • show_pad: show [PAD] in output
  • return: thai text from ASR