Liking cljdoc? Tell your friends :D

com.blockether.vis.ext.foundation-voice.asr

Direct Java sherpa-onnx integration for Parakeet TDT ASR.

Direct Java sherpa-onnx integration for Parakeet TDT ASR.
raw docstring

bundled-model-available?clj

(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.
sourceraw docstring

default-model-dirclj

~/.vis model path used when no env/config override is set.

~/.vis model path used when no env/config override is set.
sourceraw docstring

ensure-model!clj

(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`.
sourceraw docstring

min-audio-secondsclj

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.
sourceraw docstring

model-dirclj

(model-dir)
source

model-dir-envclj

source

model-filesclj

(model-files)
(model-files dir)
source

model-installed?clj

(model-installed?)
(model-installed? dir)
source

model-stateclj

(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)
sourceraw docstring

model-urlclj

source

start-download!clj

(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.
sourceraw docstring

transcribe-file!clj

(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.
sourceraw docstring

validate-wav-file!clj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close