Metadata-Version: 2.4
Name: monlam-stt
Version: 0.1.0
Summary: Tibetan speech-to-text (STT) utilities extracted from monlamai-API.
Author-email: Monlam AI <you@example.com>
License: MIT
Project-URL: Homepage, https://example.com/monlam-stt
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0
Requires-Dist: ffmpeg-python>=0.2.0

# 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:

```bash
pip install monlam-stt
```

For local development inside this repo:

```bash
cd monlam_stt_pkg
pip install -e .
```

## Usage

Basic async usage:

```python
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 model
- `STT_MODEL_URL_TIBETAN` – URL of the STT model endpoint

## Development

Build the distribution:

```bash
cd monlam_stt_pkg
python -m pip install --upgrade build
python -m build
```

Upload to PyPI:

```bash
python -m pip install --upgrade twine
python -m twine upload dist/*
```


