Tibetan speech-to-text (STT) utilities extracted from monlamai-API.
Project description
monlam-stt
monlam-stt is a small Python library that exposes the core speech-to-text (STT) logic
from the Monlam AI API as a reusable package.
It provides helpers to:
- Convert audio bytes to FLAC using
ffmpeg - Send base64-encoded audio to a Hugging Face STT model
Installation
After publishing to PyPI, you will be able to install it with:
pip install monlam-stt
For local development inside this repo:
cd monlam_stt_pkg
pip install -e .
Usage
Basic async usage:
import asyncio
from monlam_stt import transcribe_bytes
async def main():
with open("example.wav", "rb") as f:
audio = f.read()
text = await transcribe_bytes(audio)
print(text)
asyncio.run(main())
Environment variables expected:
MODEL_AUTH– Bearer token for the Hugging Face modelSTT_MODEL_URL_TIBETAN– URL of the STT model endpoint
Development
Build the distribution:
cd monlam_stt_pkg
python -m pip install --upgrade build
python -m build
Upload to PyPI:
python -m pip install --upgrade twine
python -m twine upload dist/*
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file monlam_stt-0.1.0.tar.gz.
File metadata
- Download URL: monlam_stt-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a7598025ed4abed157834c4c8636184978364e16d1decc55f0dbf528d386d78
|
|
| MD5 |
6024e39c4a07fc89d1f3bf54debe74b8
|
|
| BLAKE2b-256 |
8c0ebf3e634b3ea798b0008036e6c5b9eedac95b6addcce943690dd8f1ea23b2
|
File details
Details for the file monlam_stt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: monlam_stt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c91715ea1a74d283ecf42089c39c84fbb5aa7b87e4f619c9d5890776702a63f
|
|
| MD5 |
dd298d8cc03097397fc342c7dc662878
|
|
| BLAKE2b-256 |
ea777785e79d8aa2b8f9208acfe605741331bb62b7aade9cf22dc42adc47983a
|