Metadata-Version: 2.4
Name: voxrt
Version: 0.2.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Dist: huggingface-hub>=0.20
Requires-Dist: soundfile>=0.12 ; extra == 'audio'
Requires-Dist: numpy ; extra == 'audio'
Requires-Dist: pytest>=7 ; extra == 'test'
Requires-Dist: soundfile>=0.12 ; extra == 'test'
Requires-Dist: numpy ; extra == 'test'
Provides-Extra: audio
Provides-Extra: test
Summary: Fast, deterministic speech-to-text runtime for moondream/parakeet-redux (ternary Parakeet-TDT), in Rust
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/lmaksym/voxrt/blob/main/CHANGELOG.md
Project-URL: Core ML bundle, https://huggingface.co/MaksL/voxrt-parakeet-redux-coreml
Project-URL: Model, https://huggingface.co/moondream/parakeet-redux
Project-URL: Repository, https://github.com/lmaksym/voxrt

# voxrt (Python)

Python bindings for [voxrt](https://github.com/lmaksym/voxrt), a Rust runtime for
[moondream/parakeet-redux](https://huggingface.co/moondream/parakeet-redux) (ternary Parakeet-TDT, 25 languages):
`pip install voxrt` (wheels for Apple silicon / Intel Macs and Linux x86-64) or `maturin develop` from this directory.
On Apple silicon the encoder runs on the GPU; `device="ane"` uses the Neural Engine with the Core ML bundle
[`MaksL/voxrt-parakeet-redux-coreml`](https://huggingface.co/MaksL/voxrt-parakeet-redux-coreml).

```python
import voxrt
t = voxrt.Transcriber()                        # downloads moondream/parakeet-redux into the HF cache on first use,
                                               # (device="ane": plus the Neural Engine bundle, ≈ 300 MB)
                                               # (or Transcriber("/path/to/model"), or set VOXRT_MODEL_DIR)
r = t.transcribe("talk.mp3")                   # WAV natively; FLAC/OGG/MP3 with `pip install voxrt[audio]`;
print(r.text)                                  # other formats (M4A, AAC, video) when ffmpeg is on PATH
for s in r.segments:                           # Segment(start, end, text, words=[Word(word, start, end)])
    print(f"[{s.start:.2f}-{s.end:.2f}] {s.text}")
r = t.transcribe(samples, sample_rate=48000)   # numpy array: mono, or [n, channels] (averaged)
st = t.stream(); st.push(chunk_16k); ...; st.flush()  # streaming == offline (same segment cuts)
```

The GIL is released during transcription; one `Transcriber` can serve several threads.

Results are frozen dataclasses (`Transcript`, `Segment`, `Word`); the package ships type hints (`py.typed`).
Tests: `pip install voxrt[test]` then `VOXRT_TEST_DOWNLOAD=1 pytest bindings/python/tests` (or point `VOXRT_MODEL_DIR`
at a local copy). The test clip is LibriSpeech test-clean `1089-134686-0001` (CC BY 4.0, see `tests/audio/ATTRIBUTION.md`).


