Skip to content

Latest commit

 

History

History
260 lines (173 loc) · 10.2 KB

PARAKEET.md

File metadata and controls

260 lines (173 loc) · 10.2 KB

Parakeet Backend

Voxtype supports NVIDIA's Parakeet ASR models as an alternative to Whisper. Parakeet uses ONNX Runtime and offers excellent CPU performance without requiring a GPU.

What is Parakeet?

Parakeet is NVIDIA's FastConformer-based speech recognition model. The TDT (Token-and-Duration Transducer) variant provides:

  • Fast CPU inference with AVX-512 optimization
  • Proper punctuation and capitalization
  • Good accuracy for English dictation
  • No GPU required (though CUDA acceleration is available)

Requirements

  • An ONNX-enabled voxtype binary (see below)
  • ~600MB disk space for the model
  • CPU with AVX2 or AVX-512 (AVX-512 recommended for best performance)

Getting a Parakeet Binary

Parakeet support requires an ONNX-enabled binary. Download from the releases page:

Binary Use Case
voxtype-*-onnx-avx2 Most CPUs (Intel Haswell+, AMD Zen+)
voxtype-*-onnx-avx512 Modern CPUs with AVX-512 (Intel Ice Lake+, AMD Zen 4+)
voxtype-*-onnx-cuda NVIDIA GPU acceleration with CPU fallback

The AVX2 binary works on most modern x86_64 CPUs. Use AVX-512 if your CPU supports it for better performance.

Downloading the Model

Download the Parakeet TDT 0.6B model:

# Create models directory
mkdir -p ~/.local/share/voxtype/models

# Download and extract the model
cd ~/.local/share/voxtype/models
curl -L https://huggingface.co/istupakov/parakeet-tdt-0.6b-v2-onnx/resolve/main/encoder-model.onnx -o encoder-model.onnx
curl -L https://huggingface.co/istupakov/parakeet-tdt-0.6b-v2-onnx/resolve/main/encoder-model.onnx.data -o encoder-model.onnx.data
curl -L https://huggingface.co/istupakov/parakeet-tdt-0.6b-v2-onnx/resolve/main/decoder_joint-model.onnx -o decoder_joint-model.onnx
curl -L https://huggingface.co/istupakov/parakeet-tdt-0.6b-v2-onnx/resolve/main/vocab.txt -o vocab.txt
curl -L https://huggingface.co/istupakov/parakeet-tdt-0.6b-v2-onnx/resolve/main/config.json -o config.json

# Or download the full directory structure
# The model should be at: ~/.local/share/voxtype/models/parakeet-tdt-0.6b-v2/

Alternatively, use the v3 model (https://huggingface.co/istupakov/parakeet-tdt-0.6b-v3-onnx):

mkdir -p ~/.local/share/voxtype/models/parakeet-tdt-0.6b-v3
cd ~/.local/share/voxtype/models/parakeet-tdt-0.6b-v3
# Download encoder-model.onnx, encoder-model.onnx.data, decoder_joint-model.onnx, vocab.txt, config.json

Switching to a Parakeet Binary

The standard voxtype binary does not include Parakeet support. You must switch to an ONNX-enabled binary.

Manual switching (until voxtype setup engine is implemented):

# Download the Parakeet binary for your CPU
# Example: AVX-512 capable CPU
curl -L https://github.com/peteonrails/voxtype/releases/download/v0.6.3/voxtype-0.6.3-linux-x86_64-onnx-avx512 \
  -o /tmp/voxtype-onnx

# Make executable and install
chmod +x /tmp/voxtype-onnx
sudo mv /tmp/voxtype-onnx /usr/local/bin/voxtype

# Restart the daemon
systemctl --user restart voxtype

# Verify
voxtype --version

To switch back to Whisper, download and install the standard binary (avx2, avx512, or vulkan).

Configuration

Edit ~/.config/voxtype/config.toml:

# Select Parakeet as the transcription engine
engine = "parakeet"

[parakeet]
# Model name (looked up in ~/.local/share/voxtype/models/)
model = "parakeet-tdt-0.6b-v3"

# Or use an absolute path
# model_path = "/path/to/parakeet-tdt-0.6b-v3"

Restart the daemon:

systemctl --user restart voxtype

Verify Parakeet is active:

journalctl --user -u voxtype --since "1 minute ago" | grep -i parakeet
# Should show: "Loading Parakeet Tdt model from..."

Performance

Tested on Ryzen 9 9900X3D (AVX-512):

Audio Length Transcription Time Real-time Factor
1-2s 0.06-0.09s ~20x
3-4s 0.11-0.13s ~30x
5s 0.15s ~33x

Model load time: ~1.2 seconds (one-time at daemon startup)

Comparison with Whisper

Engine Backend Typical Speed GPU Required
Whisper small CPU ~3x real-time No
Whisper small Vulkan ~60x real-time Yes
Parakeet TDT CPU (AVX-512) ~30x real-time No
Parakeet TDT CUDA ~80x real-time Yes (NVIDIA)

Parakeet on CPU is significantly faster than Whisper on CPU, and competitive with Whisper on GPU.

GGUF on Vulkan (transcribe.cpp)

Voxtype can also run Parakeet TDT 0.6B v3 as a GGUF model through transcribe.cpp on a Vulkan GPU. It is the same parakeet engine: a [parakeet] model ending in .gguf selects transcribe.cpp, anything else selects ONNX Runtime. It needs no ONNX Runtime.

transcribe.cpp runs in a helper process, voxtype-gguf-worker, which voxtype starts when it loads the model and keeps running so the model stays loaded between recordings. It is a separate program because transcribe.cpp and Whisper each bundle their own copy of the ggml library, and the two copies cannot share one process. Every release binary includes the GGUF client, and release packages install a matching worker next to each binary: the vulkan and x86_64 ONNX binaries (onnx-avx2, onnx-avx512, onnx-cuda-12, onnx-cuda-13, onnx-migraphx) get a Vulkan-capable worker, so a Vulkan GPU runs GGUF whichever of those binaries you use, and with gguf_backend = "auto" it falls back to the CPU when no Vulkan device initializes. The Whisper CPU binaries (baseline, avx2, avx512) and the aarch64 binaries get a CPU worker. Building from source, enable GGUF in voxtype with --features gpu-vulkan (or --features parakeet-gguf), then build the worker with the GPU backend you want:

cargo build --release -p voxtype-gguf-worker --features vulkan

and install target/release/voxtype-gguf-worker beside voxtype, or point VOXTYPE_GGUF_WORKER at it.

Run voxtype setup model and pick a Parakeet GGUF, or download one directly:

voxtype setup --download --model parakeet-tdt-0.6b-v3-F16.gguf --activate

Then select the GPU explicitly:

engine = "parakeet"

[parakeet]
model = "parakeet-tdt-0.6b-v3-F16.gguf"
gguf_backend = "vulkan"

parakeet-tdt-0.6b-v3-Q8_0.gguf is a smaller download (0.74 GB against 1.26 GB) with the same accuracy and speed in the tests below. Setup verifies both against the SHA-256 published by handy-computer in parakeet-tdt-0.6b-v3-gguf; the other quantizations there work by absolute path.

Long recordings are split with the same max_window_secs and window_overlap_secs as the ONNX models, because transcribe.cpp's encoder uses full attention and its memory grows with the square of the input length. streaming = true is not supported with GGUF models and is reported as a configuration error.

Seconds to transcribe after the model is loaded, on a Ryzen AI 9 HX 370 with a Radeon 890M iGPU (transcribe.cpp 0.2.3; ONNX fp32 on the CPU):

Audio GGUF Vulkan F16 GGUF Vulkan Q8_0 ONNX CPU, 4 threads ONNX CPU, 12 threads
5 s 0.11 0.09 0.35 0.26
12 s 0.19 0.20 0.68 0.52
1 min 0.95 0.91 3.83 2.81
3 min 3.43 3.42 12.3 9.30

Word error rate on LibriSpeech test-clean was the same for all three: 1.7% on the 1-minute clip and 0.8% on the 3-minute clip. In this test transcribe.cpp on its CPU backend was slower than ONNX (13.5 s for the 3-minute clip at 12 threads). New Parakeet selections default to the GGUF model in every build, because ONNX Runtime support is removed in voxtype 2.0. Until then, ONNX builds can still select an ONNX model explicitly, for example voxtype config set parakeet.model parakeet-tdt-0.6b-v3.

Known Limitations

Repetition Hallucination

Parakeet can hallucinate extra repetitions when you speak repeated words. For example, saying "no no no no no" might transcribe as many more "no"s than you actually said. This is a known issue with many ASR models.

Proper Noun Handling

Uncommon names and technical terms may be substituted with phonetically similar common words. For example:

  • "Krzyzewski" → "Krasiewski"
  • "Nguyen" → "Gwen"

English Only

Parakeet TDT models are English-only. For multilingual support, use Whisper.

Model Size

The Parakeet TDT 0.6B model is ~600MB, compared to Whisper small at ~500MB. Larger Parakeet models are available but not yet tested with voxtype.

Switching Back to Whisper

To switch back to Whisper, edit your config:

engine = "whisper"

[whisper]
model = "small"

Or simply remove the engine line (Whisper is the default).

Troubleshooting

"Parakeet engine requested but voxtype was not compiled with --features parakeet"

You're using a standard voxtype binary without Parakeet support. Download an onnx-* binary from the releases page.

"Parakeet engine selected but [parakeet] config section is missing"

Add the [parakeet] section to your config:

[parakeet]
model = "parakeet-tdt-0.6b-v3"

Model not found

Ensure the model is in the correct location:

ls ~/.local/share/voxtype/models/parakeet-tdt-0.6b-v3/
# Should show: encoder-model.onnx, encoder-model.onnx.data, decoder_joint-model.onnx, vocab.txt, config.json

SIGILL crash on older CPUs

Parakeet binaries include ONNX Runtime, which contains AVX-512 optimized code paths. ONNX Runtime performs CPU feature detection at runtime and should only execute instructions your CPU supports.

If you experience a SIGILL (illegal instruction) crash, this is likely a bug in ONNX Runtime's CPU detection rather than a fundamental incompatibility. As a workaround, switch to a Whisper binary:

  • voxtype-*-avx2 - Works on Intel Haswell+ and AMD Zen+
  • voxtype-*-vulkan - GPU acceleration for AMD/Intel GPUs

Please report the issue at https://github.com/peteonrails/voxtype/issues with:

  • Your CPU model (cat /proc/cpuinfo | grep "model name" | head -1)
  • Which Parakeet binary you were using
  • The full error output

Feedback

Please report issues at: https://github.com/peteonrails/voxtype/issues

Include:

  • Your CPU model
  • Which binary you're using (avx2/avx512/cuda)
  • The Parakeet model version
  • Sample audio if possible (for accuracy issues)