Skip to main content

Python Thai ASR

Project description

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:

Project details


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.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

pythaiasr-1.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file pythaiasr-1.1.1.tar.gz.

File metadata

  • Download URL: pythaiasr-1.1.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

Hashes for pythaiasr-1.1.1.tar.gz
Algorithm Hash digest
SHA256 a2e2800fc83945657b57cd4cefc273db6c530cd9b92b8487fb0f78aa6d55435a
MD5 f28495be940fba190e957277b5967a16
BLAKE2b-256 e1030fd7d53db5a626de8ee526d98d442d07c9d736afd3a12a23bd597fd8de5b

See more details on using hashes here.

Provenance

File details

Details for the file pythaiasr-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pythaiasr-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pythaiasr-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 166d16587fffdb84f8c0300c1246a1d74492992e27b0bb39fbb7e942d9551a55
MD5 97556424846c98b3570930b121aff6af
BLAKE2b-256 c6eab98c86b8cce5c4d8ef1345c7627ddb36d8292894577a79b45a037ad71034

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page