Skip to main content

MERaLiON-3-ASR

CodeQL Security (Bandit) Dependency Audit Pylint OpenSSF Scorecard

These checks run on every push: CodeQL static analysis, Bandit security SAST, pip-audit dependency CVE scanning, and Pylint; plus OpenSSF Scorecard supply-chain analysis.

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. vLLM is the recommended backend. A pure transformers backend is also available (see Transformers backend below).

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.

Transformers backend

vLLM is the recommended backend. A pure transformers backend is also available — it loads the model in-process with AutoModelForSpeechSeq2Seq, which is handy for debugging or environments without vLLM:

from meralion_3_asr import Meralion3ASR

model = Meralion3ASR.from_pretrained("MERaLiON/MERaLiON-3-3B-ASR", backend="transformers")

text = model.transcribe("audio.wav")                          # str
texts = model.transcribe_batch(["a.wav", "b.wav", "c.wav"])   # List[str]

The same prompt, decoding configuration, and 30 s chunking are applied on both backends. See docs/backends.md for a vLLM-vs-transformers comparison.

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

MERaLiON-3-Public-Licence

Metadata

Release files for meralion-3-asr 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meralion-3-asr 0.1.0
File Size Uploaded
meralion_3_asr-0.1.0.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meralion-3-asr 0.1.0
File Interpreter ABI Platform
meralion_3_asr-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.4 kB

Release files / meralion_3_asr-0.1.0.tar.gz

Download URL meralion_3_asr-0.1.0.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1871733b5aa7eeed00abc3ad7228088a29f39b5737a0b57074a5f08429b32b58
BLAKE2b-256 checksum
How to use checksums
f884420f0802488f81fface91c5ced6843b12f9109f48c86877d798d1acb1a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

Release files / meralion_3_asr-0.1.0-py3-none-any.whl

Download URL meralion_3_asr-0.1.0-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
939911f3d5856a307adf723d042eac21842afc40a008e94e5f74245af5455b9a
BLAKE2b-256 checksum
How to use checksums
68664d87805c2048191b4e1b0ae86fa1a88294405423e107122623850b24e920
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page