Metadata-Version: 2.4
Name: ekko-stt
Version: 0.1.0
Summary: Local Danish speech recognition and punctuation with Ekko Tiny and PnC
Author: Emil Schledermann / RyeAI
License-Expression: MIT
Project-URL: Homepage, https://github.com/Rye-A1/ekko-danish-stt
Project-URL: Issues, https://github.com/Rye-A1/ekko-danish-stt/issues
Keywords: asr,danish,speech-to-text,onnx,gguf
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Requires-Dist: filelock<4,>=3.13
Requires-Dist: huggingface-hub<2,>=0.27
Requires-Dist: numpy<3,>=1.26
Requires-Dist: soundfile<1,>=0.12
Requires-Dist: soxr<2,>=0.5
Provides-Extra: pnc
Requires-Dist: onnxruntime==1.29.0; extra == "pnc"
Requires-Dist: tokenizers==0.22.2; extra == "pnc"
Provides-Extra: tiny-onnx
Requires-Dist: sherpa-onnx==1.13.6; extra == "tiny-onnx"
Requires-Dist: sherpa-onnx-core==1.13.6; extra == "tiny-onnx"
Provides-Extra: local
Requires-Dist: onnxruntime==1.29.0; extra == "local"
Requires-Dist: sherpa-onnx==1.13.6; extra == "local"
Requires-Dist: sherpa-onnx-core==1.13.6; extra == "local"
Requires-Dist: tokenizers==0.22.2; extra == "local"
Dynamic: license-file

# Ekko STT

![Ekko STT: Tiny speech recognition and PnC text formatting](https://raw.githubusercontent.com/Rye-A1/ekko-danish-stt/main/assets/ekko-stt-cover.png)

Local inference for [Ekko v1 Tiny](https://huggingface.co/RyeAI/ekko-v1-tiny),
a Danish speech recognizer with word timestamps, and
[Ekko PnC](https://huggingface.co/RyeAI/ekko-pnc), its optional punctuation and
capitalization model. This repository contains the Python runtime and the
[browser demo](https://huggingface.co/spaces/RyeAI/ekko-tiny-browser).

| Command | Runtime | Default model |
|---|---|---|
| `ekko tiny` | parakeet.cpp | Q5_0 GGUF |
| `ekko tiny-onnx` | sherpa-onnx | int8 ONNX |
| `ekko pnc` | ONNX Runtime | PnC int8 |

## Run locally

Install [uv](https://docs.astral.sh/uv/), then from this checkout:

```bash
uv sync --locked --no-editable --extra pnc
uv run --no-sync ekko tiny audio.wav --pnc --format json
```

To format an existing transcript without running speech recognition:

```bash
uv run --no-sync ekko pnc "hej mit navn er emil hvordan går det i dag"
```

For the ONNX runtime:

```bash
uv sync --locked --no-editable --extra tiny-onnx --extra pnc
uv run --no-sync ekko tiny-onnx audio.wav --precision int8 --pnc --format json
```

The first run downloads model artifacts from Hugging Face and the native
parakeet.cpp library when needed. Downloads use immutable revisions and
SHA-256 checks in [the release manifest](https://github.com/Rye-A1/ekko-danish-stt/blob/main/src/ekko/release_manifest.json).
Set `EKKO_OFFLINE=1` after prefetching to prevent network access.

The [browser demo](https://huggingface.co/spaces/RyeAI/ekko-tiny-browser) runs Tiny and PnC locally
through WebAssembly. Audio and transcripts stay on the device.

## Development

```bash
uv sync --locked --extra local
uv run --no-sync python -m unittest discover -s tests -p 'test_*.py'
uv build
```

The source code is MIT licensed. Tiny and PnC weights have their own terms in
their Hugging Face repositories. See [third-party notices](https://github.com/Rye-A1/ekko-danish-stt/blob/main/THIRD_PARTY_NOTICES.md)
for runtime dependencies.
