Direct Java sherpa-onnx integration for Parakeet TDT ASR.
Direct Java sherpa-onnx integration for Parakeet TDT ASR.
(bundled-model-available?)True when the ASR model is embedded as classpath resources — i.e. this is a
--with-assets native build — so it can be installed WITHOUT a network
download by copying the resources straight out of the binary.
True when the ASR model is embedded as classpath resources — i.e. this is a `--with-assets` native build — so it can be installed WITHOUT a network download by copying the resources straight out of the binary.
~/.vis model path used when no env/config override is set.
~/.vis model path used when no env/config override is set.
(ensure-model!)(ensure-model! dir)Download + atomically install the Parakeet int8 model if missing (blocking).
Returns model dir. Used by the TUI's synchronous voice path; the web drives
a non-blocking download via start-download! + model-state.
Download + atomically install the Parakeet int8 model if missing (blocking). Returns model dir. Used by the TUI's synchronous voice path; the web drives a non-blocking download via `start-download!` + `model-state`.
Minimum microphone audio length sent to Parakeet ASR. Very short clips either transcribe blank or trigger opaque ONNX Conv_quant shape errors, so reject them before inference.
Minimum microphone audio length sent to Parakeet ASR. Very short clips either transcribe blank or trigger opaque ONNX Conv_quant shape errors, so reject them before inference.
(model-state)Current voice-model state for a UI to POLL: {:state :ready} model files installed {:state :downloading :progress 0..100} a background download is running {:state :failed :error "…"} the last download failed {:state :absent} not installed, idle (no download)
Current voice-model state for a UI to POLL:
{:state :ready} model files installed
{:state :downloading :progress 0..100} a background download is running
{:state :failed :error "…"} the last download failed
{:state :absent} not installed, idle (no download)(start-download!)Idempotent, NON-blocking: if the model is absent and no download is already
running, start one on a background thread (progress tracked in the atom).
Returns the current model-state immediately.
Idempotent, NON-blocking: if the model is absent and no download is already running, start one on a background thread (progress tracked in the atom). Returns the current `model-state` immediately.
(transcribe-file! audio-path)(transcribe-file! dir audio-path)Transcribe audio-path with local Parakeet TDT int8 through the sherpa-onnx
Java API. Auto-downloads the model on first use. Returns plain text.
Transcribe `audio-path` with local Parakeet TDT int8 through the sherpa-onnx Java API. Auto-downloads the model on first use. Returns plain text.
(validate-wav-file! audio-path)Structural RIFF/WAVE check in PURE JVM code before a file reaches
sherpa-onnx's native WaveReader, which SIGSEGVs AND ABORTS THE WHOLE JVM
on malformed input — including a well-formed header whose declared chunk
sizes overrun the bytes actually present (a truncated upload or partial
write; observed live). No catchable native exception is on offer, so
every chunk in the table must fit inside the file, and a 16-bit PCM
fmt chunk plus a data chunk must both be present (the only shape
either producer emits — ui.js's encoder and the TUI recorder — and the
only one WaveReader reads). Throws ex-info :voice-asr/invalid-wav.
Returns audio-path.
Structural RIFF/WAVE check in PURE JVM code before a file reaches sherpa-onnx's native WaveReader, which SIGSEGVs AND ABORTS THE WHOLE JVM on malformed input — including a well-formed header whose declared chunk sizes overrun the bytes actually present (a truncated upload or partial write; observed live). No catchable native exception is on offer, so every chunk in the table must fit inside the file, and a 16-bit PCM `fmt ` chunk plus a `data` chunk must both be present (the only shape either producer emits — ui.js's encoder and the TUI recorder — and the only one WaveReader reads). Throws ex-info :voice-asr/invalid-wav. Returns audio-path.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |