High-level ASR wrapper for MERaLiON-3-3B-ASR with transformers and vLLM backends.
Project description
MERaLiON-3-ASR
A high-level ASR wrapper around MERaLiON/MERaLiON-3-3B-ASR.
The package wraps the model with a vLLM backend and pre-wires the transcription prompt, decoding configuration, and 30 s audio chunking on both the offline path and the served path. Callers only provide audio.
Install
pip install meralion-3-asr
Requires Python 3.10+ and a CUDA GPU. vLLM and the FastAPI sidecar dependencies are installed automatically. A transformers-only backend is included for debugging and is currently experimental; vLLM is the only fully supported backend.
Quick start
from meralion_3_asr import Meralion3ASR
model = Meralion3ASR.from_pretrained("MERaLiON/MERaLiON-3-3B-ASR", backend="vllm")
text = model.transcribe("audio.wav") # str
texts = model.transcribe_batch(["a.wav", "b.wav", "c.wav"]) # List[str]
Inputs may be local file paths, https:// URLs, base64 data URLs, or (numpy_array, sample_rate) tuples. Audio is automatically resampled to mono 16 kHz; long audio is split into 30 s non-overlapping chunks and the per-chunk transcripts are concatenated.
Serving (OpenAI-compatible HTTP)
meralion-3-asr serve starts a FastAPI sidecar in front of a private vllm serve process and exposes a single OpenAI-compatible route, POST /v1/audio/transcriptions.
meralion-3-asr serve --model MERaLiON/MERaLiON-3-3B-ASR --port 8000
Common flags:
| Flag | Default | Description |
|---|---|---|
--model |
MERaLiON/MERaLiON-3-3B-ASR |
HF repo id or local path. |
--host |
0.0.0.0 |
Sidecar bind host. |
--port |
8000 |
Sidecar (user-facing) port. |
--tensor-parallel-size |
1 |
Number of GPUs for the internal vLLM. |
Any unknown --key value pairs are forwarded to the internal vllm serve.
Call it with the OpenAI Python SDK:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
with open("audio.wav", "rb") as f:
resp = client.audio.transcriptions.create(
model="MERaLiON/MERaLiON-3-3B-ASR",
file=f,
)
print(resp.text)
or raw HTTP:
curl -F file=@audio.wav -F model=MERaLiON/MERaLiON-3-3B-ASR \
http://localhost:8000/v1/audio/transcriptions
Development
pip install -e ".[dev]"
pytest -q
License
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 meralion_3_asr-0.0.2.tar.gz.
File metadata
- Download URL: meralion_3_asr-0.0.2.tar.gz
- Upload date:
- Size: 31.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00cd616773a97740bde7a15930cfbf95121aee48bebe116b4936ba87b7ba1425
|
|
| MD5 |
9d498bda01c621b5c640747b16e49440
|
|
| BLAKE2b-256 |
6c330b13f2ebb815fcbcf2ffc701ba085ace47c1cfff2154707731e821f32d30
|
Provenance
The following attestation bundles were made for meralion_3_asr-0.0.2.tar.gz:
Publisher:
publish.yml on YingxuH/MERaLiON-3-ASR
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meralion_3_asr-0.0.2.tar.gz -
Subject digest:
00cd616773a97740bde7a15930cfbf95121aee48bebe116b4936ba87b7ba1425 - Sigstore transparency entry: 1645675031
- Sigstore integration time:
-
Permalink:
YingxuH/MERaLiON-3-ASR@517c59282b2d7c6cd910cc05ddd0da5fe874bea5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/YingxuH
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@517c59282b2d7c6cd910cc05ddd0da5fe874bea5 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file meralion_3_asr-0.0.2-py3-none-any.whl.
File metadata
- Download URL: meralion_3_asr-0.0.2-py3-none-any.whl
- Upload date:
- Size: 34.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1d3763926536c084391601d92a297a4d359b5789a53c84b5a522f97a405a235
|
|
| MD5 |
82edc8c63bffe73c6747a0ed338af216
|
|
| BLAKE2b-256 |
f73ea3a9ca28c65611fb74200ee77a4d3c273ad2788711f0e86360ab56c57584
|
Provenance
The following attestation bundles were made for meralion_3_asr-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on YingxuH/MERaLiON-3-ASR
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meralion_3_asr-0.0.2-py3-none-any.whl -
Subject digest:
e1d3763926536c084391601d92a297a4d359b5789a53c84b5a522f97a405a235 - Sigstore transparency entry: 1645675124
- Sigstore integration time:
-
Permalink:
YingxuH/MERaLiON-3-ASR@517c59282b2d7c6cd910cc05ddd0da5fe874bea5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/YingxuH
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@517c59282b2d7c6cd910cc05ddd0da5fe874bea5 -
Trigger Event:
workflow_dispatch
-
Statement type: