rift-local
Local inference server for RIFT Transcription. Serves streaming speech recognition over WebSocket, backed by local models with automatic download.
Install
Requires Python 3.10+. Install with uv:
brew install uv # macOS (or: curl -LsSf https://astral.sh/uv/install.sh | sh)
uv tool install rift-local
Or with pip in a virtual environment:
python3 -m venv .venv && source .venv/bin/activate
pip install rift-local
Moonshine is included by default — rift-local serve works immediately after install.
Optional: sherpa-onnx backend
For additional sherpa-onnx models (Nemotron, Kroko):
uv tool install "rift-local[sherpa]"
Or with pip (inside a venv):
pip install rift-local[sherpa]
For development (includes pytest):
pip install -e ".[dev]"
Models
List all available models and see which are installed:
rift-local list
rift-local list --installed
sherpa-onnx models
| Model | Params | Languages | Download | Notes |
|---|---|---|---|---|
nemotron-en |
0.6B | EN | 447 MB | Best accuracy. |
zipformer-en-kroko |
~30M | EN | 55 MB | Lightweight, fast. Only ~68 MB on disk. |
Requires: pip install rift-local[sherpa]
Moonshine models
| Model | Params | Languages | Size | Notes |
|---|---|---|---|---|
moonshine-en-tiny |
34M | EN | 26 MB | Fastest. Good for low-resource. |
moonshine-en-small |
123M | EN | 95 MB | Balanced speed/accuracy. |
moonshine-en-medium |
245M | EN | 190 MB | Default. Best Moonshine accuracy. |
Requires: pip install rift-local[moonshine]
Moonshine models are downloaded automatically by the moonshine-voice library on first use.
Usage
Server mode (for RIFT app)
Start the WebSocket server with any model:
# Start server and open RIFT Transcription in your browser
rift-local serve --open
# Moonshine (default model)
rift-local serve
# sherpa-onnx
rift-local serve --model nemotron-en
# Custom host/port
rift-local serve --model moonshine-en-tiny --host 0.0.0.0 --port 8080
The --open flag launches RIFT Transcription in your browser, pre-configured to connect to the local server. The voice source is set to "Local" automatically — just click to start the mic.
For local development of the RIFT Transcription client:
rift-local serve --open dev # opens http://localhost:5173
rift-local serve --open dev:3000 # custom port
The server auto-downloads the model on first run, then listens on:
- WebSocket:
ws://127.0.0.1:2177/ws(streaming ASR) - HTTP:
http://127.0.0.1:2177/info(model metadata)
Server options
| Flag | Default | Description |
|---|---|---|
--model |
moonshine-en-medium |
Model name from registry |
--host |
127.0.0.1 |
Bind address |
--port |
2177 |
Server port |
--threads |
2 |
Inference threads |
--open |
off | Open browser to RIFT Transcription client |
WebSocket protocol
- Client connects to
/ws - Server sends
infoJSON (model name, features, sample rate) - Client sends binary frames of Float32 PCM audio at 16 kHz
- Server sends
resultJSON messages with partial/final transcriptions - Client sends text
"Done"to end the session
Running tests
# Install dev + backend dependencies
pip install -e ".[dev,sherpa,moonshine]"
# Run fast tests (mocked backends, no model download)
pytest
# Run all tests including slow integration tests (downloads models)
pytest --slow
Tests are in the tests/ directory:
test_server.py— WebSocket server tests using a mock backendtest_moonshine.py— Moonshine adapter unit tests (mocked) + integration tests (slow)conftest.py— SharedMockBackendfixture and--slowflag
Spec
See specs/rift-local.md for the full design document.
License
Metadata
Release files for rift-local 0.0.3
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 | Actions |
|---|---|---|---|---|
| rift_local-0.0.3.tar.gz | 136.4 kB | Without provenance | Details for rift_local-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rift_local-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for rift_local-0.0.3-py3-none-any.whl |
Total release size: 155.4 kB
Release files / rift_local-0.0.3.tar.gz
| Download URL | rift_local-0.0.3.tar.gz |
|---|---|
| Size | 136.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
811eabea7e9303f8d2f1e0a964317175068c2b575489fcf29f73083317e63071
|
|
BLAKE2b-256 checksum How to use checksums |
901cd725693052462b064be6ddf0ad243cd9f51cce9c8bd1ecc02f8356fa3910
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / rift_local-0.0.3-py3-none-any.whl
| Download URL | rift_local-0.0.3-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d498581e49f1c22b8e551401bf407334a4bebe97470e89ddbe3ef74dd0432ab0
|
|
BLAKE2b-256 checksum How to use checksums |
120b156d45e220ef5ef8f4acda5be6051af9bcf479a671588dcbc796d04a021b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for rift-local 0.0.3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.