Parakeet API
OpenAI Whisper-compatible API endpoint for Parakeet STT models. (MLX for Apple Silicon, Sherpa-ONNX for others)
Performance on a 3.85s wav file:
| Machine (Engine) | Latency (ms) | Speedup |
|---|---|---|
| Intel 255H (Sherpa-ONNX, CPU) | 174.46 | 22.1x |
| M2 Air (MLX, GPU) | 194.29 | 19.8x |
Installation & Setup
The easiest way to install and run parakeet-api is using uv.
1. Install the CLI
For Linux, Windows, or Intel Mac (Sherpa-ONNX / CPU):
uv tool install parakeet-api
For Apple Silicon (MLX):
uv tool install "parakeet-api[mlx]"
2. Install System Dependencies
ffmpeg must be installed on your system for non-WAV audio support.
- macOS: brew install ffmpeg
- Ubuntu/Debian: sudo apt-get install ffmpeg
3. Download Models
Models are saved to your platform's standard data directory (e.g., ~/.local/share/parakeet-api/models).
Default Models
Download the default English/European model for your engine:
Sherpa-ONNX:
parakeet-api download sherpa
MLX:
parakeet-api download mlx
Custom Models
You can use different Parakeet models by specifying a URL or Repo ID.
Sherpa-ONNX:
- Download using the script with --url:
parakeet-api download sherpa --url https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-parakeet-tdt_ctc-0.6b-ja-35000-int8.tar.bz2
For hotwords support on Transducer models (e.g. Parakeet TDT), also generate bpe.vocab:parakeet-api download sherpa --generate-bpe-vocab
- Update STT__SHERPA__MODEL_ID in your .env (or set as environment variable):
STT__SHERPA__MODEL_ID=sherpa-onnx-nemo-parakeet-tdt_ctc-0.6b-ja-35000-int8
[!NOTE] The default model is a NeMo Parakeet TDT (Transducer). Other architectures like Zipformer (e.g.
sherpa-onnx-zipformer-ja-reazonspeech-2024-08-01) are also supported but must be downloaded manually via--url.
MLX:
- Download using the script with --id:
parakeet-api download mlx --id mlx-community/parakeet-tdt_ctc-0.6b-ja
- Update STT__MLX__MODEL_ID in your .env (or set as environment variable):
STT__MLX__MODEL_ID=mlx-community/parakeet-tdt_ctc-0.6b-ja
4. Run the Server
parakeet-api serve
The API will be available at http://localhost:8816.
5. (Optional) Run as a Background Service
You can install parakeet-api as a background service (launchd on macOS, systemd on Linux).
parakeet-api install-daemon
This will create a service file and set up a configuration file (e.g. ~/.local/share/parakeet-api/.env).
To uninstall: parakeet-api uninstall-daemon
Running with Docker (Sherpa-ONNX)
For Linux or CPU environments, you can use Docker and Docker Compose.
# Download .env.example
curl -o .env.example https://github.com/likeablob/parakeet-api/raw/refs/heads/main/.env.example
# Edit .env to set your SERVER__API_KEY and other settings
cp .env.example .env
editor .env
# Create compose.yaml
cat << 'EOF' > compose.yaml
services:
api:
image: ghcr.io/likeablob/parakeet-api:latest
ports:
- "8816:8816"
env_file:
- .env
volumes:
- type: bind
source: ./models
target: /app/models
environment:
- SERVER__HOST=0.0.0.0
- SERVER__PORT=8816
- STT__MODELS_DIR=/app/models
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
EOF
# Download model
mkdir models
docker compose run --rm api download sherpa --out /app/models
# Start the server
docker compose up -d
Usage
API Endpoints
POST /v1/audio/transcriptions
Transcribe audio to text using the OpenAI Whisper-compatible API format.
Example with curl:
curl -X POST "http://localhost:8816/v1/audio/transcriptions" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/audio.wav" \
-F "response_format=json"
POST /v1/audio/transcriptions/raw
Same as above but accepts raw audio bytes in the request body.
curl -X POST "http://localhost:8816/v1/audio/transcriptions/raw" \
-H "Content-Type: audio/wav" \
--data-binary @/path/to/audio.wav
Supported Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| file | file | - | The audio file to transcribe. |
| response_format | string | json | json, text, verbose_json, srt, vtt. |
| timestamp_granularities[] | array | ["segment"] | word, segment (used with verbose_json). |
| hotwords | string | - | Comma-separated hotwords for contextual biasing (e.g. OpenAI:2.5,GPT-4). |
[!NOTE] Limitations of Response Formats: The current implementation provides simplified timestamp information. Consequently:
- srt / vtt: Return a single segment covering the entire audio duration (0.0 to end).
- verbose_json: Timestamps for words and segments are placeholders/estimations.
[!NOTE] Ignored Parameters: The following parameters are accepted for compatibility with the OpenAI API but are currently ignored: model, language, prompt, temperature.
Hotwords (Extension): The
hotwordsparameter is a parakeet-api extension for contextual biasing. Supported on Sherpa-ONNX Transducer models only (NeMo TDT, Zipformer, Conformer). CTC models do not support hotwords. Requiresbpe.vocabfor NeMo TDT models (generate viaparakeet-api download sherpa --generate-bpe-vocab).
Examples
Check the examples/ directory for client implementations:
- examples/client_requests.py: Basic transcription using requests.
- examples/client_openai_sdk.py: Using the official OpenAI Python SDK.
For full API compatibility details, refer to the OpenAI Audio API Reference and their OpenAPI specification.
Development
Setup from Source
- Clone the repository:
git clone https://github.com/likeablob/parakeet-api.git cd parakeet-api
- Install dependencies:
# Includes dev tools (ruff, ty, pytest, pre-commit) and optional mlx support uv sync --all-extras --dev
- Install pre-commit hooks:
uv run pre-commit install
- Run:
uv run parakeet-api serve
Code Quality & Tests
# Linting & Formatting
uv run ruff check .
uv run ruff format .
# Type Checking
uv run ty check src/ tests/
# Run Tests
uv run pytest tests/mock
uv run pytest tests/inference # Requires models
Related Projects
- push-to-whisper: Push key to record audio & STT.
License
MIT
Metadata
Release files for parakeet-api 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| parakeet_api-0.2.1.tar.gz | 19.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parakeet_api-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.1 kB
Release files / parakeet_api-0.2.1.tar.gz
| Download URL | parakeet_api-0.2.1.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba46b0c252098140fcf28318cbb0f3b9e8ba455fb374f820ebf3b551166e72e1
|
|
BLAKE2b-256 checksum How to use checksums |
72e0d3c3bcc4f7a9bf5a019419278474ca289dde6a6fe2e63a1d74041291fc4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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}
|
Release files / parakeet_api-0.2.1-py3-none-any.whl
| Download URL | parakeet_api-0.2.1-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3d74c1b4820f26e801f066c06fd9408176008f4bcfb5fd01a92090ad44cf54a
|
|
BLAKE2b-256 checksum How to use checksums |
bba426d4e7eead3e2af10077f5c3b9f83376d308260e029cf16a5f09c2caa863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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}
|
Security for parakeet-api 0.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.