Skip to main content

Khmer Speech To Text Inference API using Wav2Vec2 with Pretrain Model

Project description

Sdab

Khmer Automatic Speech Recognition

Sdab is a Python package for Automatic Speech Recognition with focus on Khmer language. It have offline khmer automatic speech recognition model from my Pretrain Model and other that using Wav2Vec2 model.

License: Apache-2.0 License

Pretrain Model: Huggingface

Install From Source

# clone repo 
git clone https://github.com/MetythornPenn/sdab.git

# install lib from source (recommend python 3.8)
pip install -e .

Usage

from sdab import Sdab

file_path = "sample/audio.wav"
model_name = "metythorn/khmer-asr-openslr"  # or local directory path

sdab = Sdab( file_path = file_path, model_name = model_name)
print(sdab.result)

# result : ស្ពានកំពងចំលងអ្នកលើងនៅព្រីវែញជាស្ពានវេញជាងគេសក្នុងព្រសរាជាអាចកម្ពុជា
  • file_path: path of audio file
  • model_name : pretrain model path from huggingface or local
  • device : should be cpu or cuda but I use cpu by default
  • tokenized: show [PAD] in output, False by default
  • return: Khmer text from ASR

Reference

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

sdab-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

sdab-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file sdab-0.1.0.tar.gz.

File metadata

  • Download URL: sdab-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sdab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e41edb9e866fcf2d86cd9bea6f0b36fcfc060c12edb3eb2003806a77621427ef
MD5 c0cd30c487b13e6fd4ad05bcfc9c0579
BLAKE2b-256 463256911b089d938edfbcaad2a0902bec18080310a216d52cb88dbdb31aa608

See more details on using hashes here.

File details

Details for the file sdab-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sdab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sdab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e215a58753b3c8a15b43206391323203e43e978bf9fe7ecae9d874f57bfe124b
MD5 58821c3ee6f07ff926e5b5e47efa65c1
BLAKE2b-256 ca7045aa2893d9433a2583aeea34d8a1d25ce079b29805633572c5bb6c2198d7

See more details on using hashes here.

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