Skip to main content

REST API for audio transcription using parakeet-mlx

Project description

Paratran

REST API for audio transcription on Apple Silicon, powered by parakeet-mlx.

Parakeet is #1 on the Open ASR Leaderboard and runs ~30x faster than Whisper on Apple Silicon via MLX.

Requirements

  • macOS with Apple Silicon (M1/M2/M3/M4)
  • Python 3.11+
  • ~2 GB memory for the default model

Quick Start

Run without installing:

uvx paratran

Install

uv (recommended)

uv tool install paratran
paratran

pip

pip install paratran
paratran

From source

git clone https://github.com/briansunter/paratran.git
cd paratran
uv sync
uv run paratran

Usage

# Default settings
paratran

# Custom model cache location
paratran --model-dir /Volumes/Storage/models

# Custom host and port
paratran --host 127.0.0.1 --port 9000

# Different model
paratran --model mlx-community/parakeet-tdt-1.1b-v2

All options can also be set via environment variables:

CLI Flag Env Var Default
--model PARATRAN_MODEL mlx-community/parakeet-tdt-0.6b-v3
--model-dir PARATRAN_MODEL_DIR HuggingFace default (~/.cache/huggingface)
--host 0.0.0.0
--port 8000

API

GET /health

curl http://localhost:8000/health
{
  "status": "ok",
  "model": "mlx-community/parakeet-tdt-0.6b-v3",
  "model_dir": "/Volumes/Storage/models"
}

POST /transcribe

Upload an audio file (wav, mp3, flac, m4a, ogg, webm):

curl -X POST http://localhost:8000/transcribe -F "file=@recording.m4a"
{
  "text": "Hello world, this is a test.",
  "duration": 3.52,
  "processing_time": 0.176,
  "sentences": [
    {
      "text": "Hello world, this is a test.",
      "start": 0.0,
      "end": 3.52,
      "tokens": [
        { "text": "Hello", "start": 0.0, "end": 0.48 },
        { "text": " world", "start": 0.48, "end": 0.8 }
      ]
    }
  ]
}

Interactive API docs are available at http://localhost:8000/docs.

License

MIT

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

paratran-0.2.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paratran-0.2.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file paratran-0.2.1.tar.gz.

File metadata

  • Download URL: paratran-0.2.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for paratran-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b0c23d6a7a0819544e83fbb20a71c0d2c547a16e264ddebac583c077e1ae3b8c
MD5 838102d456c26f3f1ed59ed2b64f6b4a
BLAKE2b-256 f96350755297a66048291365708d35eba8f5eacd366ce60b15ae16b59e543cc3

See more details on using hashes here.

File details

Details for the file paratran-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: paratran-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for paratran-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 627d533ae8148d5bb4f4ae3d327fb761be66315565b0a41ce14a21f732784837
MD5 fd55a53d18bb4b32ad7bc509c7473f17
BLAKE2b-256 e152575cbf8a720f12d62bf8e9b7f0660d637869d83d323786104c3fbb06664b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page