npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qvac/asr-ggml

v0.14.1

Published

Multi-engine ASR (Whisper + NVIDIA Parakeet + MOSS-Transcribe-Diarize) inference addon for qvac on the Bare runtime

Readme

@qvac/asr-ggml

Multi-engine automatic speech recognition for QVAC runtime applications on the Bare runtime. One npm package and one native prebuild serve three ggml-based ASR engines behind a single class, ASRGgml:

| Engine | Native library | Good for | | --- | --- | --- | | Whisper | whisper.cpp | Multilingual offline transcription, translation, Silero-VAD-segmented live capture | | Parakeet | parakeet-cpp through the speech-cpp umbrella port (NVIDIA Parakeet / Sortformer / Nemotron) | Low-latency streaming ASR, native end-of-turn detection, up to 8-speaker diarization | | MOSS-Transcribe-Diarize | the same parakeet engine of speech-cpp (OpenMOSS MOSS-Transcribe-Diarize) | One-pass transcription of whole recordings with speaker labels, timestamps and per-request hotwords (Spanish and Chinese) |

This package replaces @qvac/transcription-whispercpp and @qvac/transcription-parakeet. See CHANGELOG.md for the breaking changes the merge introduced.

Table of Contents

Supported Engines and Models

Whisper (engine: 'whisper')

Legacy single-file GGML .bin checkpoints from ggerganov/whisper.cpp:

| Model | Size | Description | |-------|------|-------------| | ggml-tiny.bin | 78 MB | Smallest, fastest | | ggml-base.bin | 148 MB | Balanced size/accuracy | | ggml-small.bin | 488 MB | Better accuracy | | ggml-medium.bin | 1.5 GB | High accuracy | | ggml-large-v3.bin | 3.1 GB | Best accuracy | | ggml-large-v3-turbo.bin | 1.6 GB | Best accuracy, faster |

Quantized variants (q8_0, q5_1, q5_0) exist for all sizes. Whisper covers ~99 languages plus translation-to-English, and the fine-tuned per-language checkpoints listed in NOTICE also load.

VAD model (required for runStreaming()), from ggml-org/whisper-vad:

| Model | Size | Description | |-------|------|-------------| | ggml-silero-v5.1.2.bin | 885 KB | Silero VAD for voice-activity detection |

Parakeet (engine: 'parakeet')

Single-file .gguf checkpoints. The model type is auto-detected from the GGUF metadata — there is no modelType to pass.

| Variant | Languages | Decoder | ~Size (q8_0) | Notes | |---------|-----------|---------|-------------:|-------| | CTC (parakeet-ctc-0.6b) | English | argmax CTC | ~700 MiB | Fast, no punctuation/capitalization | | TDT (parakeet-tdt-0.6b-v3) | ~25 | RNN-T greedy + duration | ~715 MiB | Recommended default; PnC + language auto-detect | | Unified (parakeet-unified-en-0.6b) | English | RNN-T | ~715 MiB | One checkpoint for batch and cache-aware streaming at 80/160/560/1040 ms; PnC | | TranscribePsy EU (transcribepsy-250m-eu) | 25 European | RNN-T greedy + duration | — | Full model with six CAFE adapters and a language gate embedded in one GGUF; parakeetConfig.language selects en, other, or auto; on Apple, optional Core ML sidecars run both routes and the gate | | TranscribePsy EU-sub (transcribepsy-250m-eu-sub) | 8 European | RNN-T greedy + duration | ~291 MiB | 254M distilled from TDT v3 for Dutch, English, French, German, Italian, Polish, Portuguese and Spanish; PnC; long recordings use the 60 s / 25 % windows it recommends; Core ML distribution runs encoder and decoder on the Neural Engine | | EOU (parakeet-eou-120m-v1) | English | RNN-T greedy + <EOU> | ~132 MiB | Streaming-trained; native end-of-turn token | | Indic Conformer CTC (indic-conformer-ctc) | Indic aggregate | argmax CTC + language mask | ~701 MiB | Multilingual Indic; set parakeetConfig.language (e.g. "hi") | | Sortformer v1 (sortformer-4spk-v1) | n/a | Diarization head (sliding history) | ~141 MiB | 4-speaker. Default for offline diarization | | Sortformer v2.1 + AOSC (diar_streaming_sortformer_4spk-v2.1) | n/a | Diarization head + speaker cache | ~141 MiB | 4-speaker. Default for streaming diarization; AOSC anchors speaker slots across silence, auto-detected from GGUF metadata | | Nemotron 3 Diarization (Nemotron-3-Diarization) | n/a | Diarization head + speaker cache | ~102 MiB | Up to 8 speakers, 10 ms probabilities, offline and AOSC streaming; official q8_0 GGUF |

On macOS and iOS, TDT, Unified, EOU, and Sortformer v2.1 can also run their encoder on an optional Core ML sidecar, and TranscribePsy EU-sub's published Core ML distribution runs its encoder and TDT decoder on the Neural Engine. The full TranscribePsy EU model takes one sidecar for its English trunk, one for its adapters and one for its language gate. Nemotron 3 Diarization and Sortformer v2.1 can run their whole network on Core ML diarizer sidecars. CTC and Indic Conformer CTC cannot use a sidecar with the pinned engine, and Sortformer v1 has none. See Core ML encoder sidecars.

TranscribePsy EU-sub is published ready to run by QVAC on Hugging Face; its model card states the license. Upstream .nemo checkpoints are NVIDIA's; see the Parakeet model cards for the per-checkpoint NVIDIA Open Model License terms.

The full TranscribePsy-250M-EU model uses engine: 'parakeet' with a GGUF converted from its NeMo checkpoint, CAFE adapters and language gate. Set parakeetConfig.language to "en" for the English trunk or "other" for the non-English adapters. "auto" (also the behavior when omitted) runs the gate on the first 20 seconds of audio and selects the route before transcription. All runtime weights are in the GGUF, so every ggml backend runs it without other files. On macOS and iOS both routes and the gate also run on Core ML when the model's own sidecars sit next to the GGUF; the EU-sub sidecars do not contain its adapters and are rejected. See the native conversion guide for checkpoint acquisition and conversion, and Core ML encoder sidecars for the bundles.

MOSS-Transcribe-Diarize (engine: 'moss-transcribe')

One .gguf holding a Whisper-shaped encoder, a 4x merge adaptor and a Qwen3-0.6B decoder, converted from OpenMOSS-Team/MOSS-Transcribe-Diarize (Apache-2.0). It transcribes a whole recording in one pass and returns timestamped segments labelled with the speaker (S01, S02, ...).

The native CPU encoder uses fused attention to avoid materializing full attention score matrices.

| File | Size | Notes | |------|-----:|-------| | moss-transcribe-diarize-q8_0.gguf | ~0.98 GB | Recommended: the same WER/CER as f16 | | moss-transcribe-diarize-f16.gguf | ~1.8 GB | Reference precision | | moss-transcribe-diarize-q5_0.gguf | ~0.64 GB | Smallest; within 1.5 points of f16 |

It is validated for Spanish (2.1-3.9 % WER) and Chinese (9.4-12.1 % CER) on 2- to 30-minute files; English is not usable (the reference model itself skips whole spans). A GGUF sniffs as parakeet, so always pass engine: 'moss-transcribe'. On macOS and iOS its audio encoder can run on an optional Core ML sidecar; see Core ML encoder sidecars.

Choosing a model

Pick a specific checkpoint, not only an engine. Whisper and Parakeet overlap on English batch transcription; they diverge on streaming semantics, language coverage, translation, and diarization.

Decision guide

| If you need… | Use this model | Notes | | --- | --- | --- | | Default multilingual / English ASR (batch or duplex stream) | parakeet-tdt-0.6b-v3 (q8_0 GGUF) | Recommended Parakeet default: ~25 languages, punctuation/capitalization, language auto-detect and 30-second streaming windows. | | TranscribePsy across 25 European languages | transcribepsy-250m-eu | Full model with embedded CAFE adapters and gate. Use parakeetConfig.language: 'en', 'other', or 'auto'; convert the checkpoint, adapters and gate into one GGUF. On Apple, its exported Core ML sidecars run both routes and the gate. | | Smallest multilingual model for phones (Dutch, English, French, German, Italian, Polish, Portuguese, Spanish) | transcribepsy-250m-eu-sub | 254M TDT distilled from parakeet-tdt-0.6b-v3: ~291 MiB q8_0, PnC, no language to set. Long recordings use the 60 s / 25 % windows the model recommends. On Apple, the Core ML distribution runs encoder and decoder on the Neural Engine. | | English batch and low-latency streaming with one checkpoint | parakeet-unified-en-0.6b | Standard RNN-T with punctuation and capitalization; use when multilingual TDT or native EOU tokens are not required. Streaming uses the native cache-aware encoder: streamingChunkMs accepts 80, 160, 560, or 1040 and streamingRightLookaheadMs 0, 80, 160, 240, 320, 560, or 1040, both snapped down to the nearest trained value. Defaults to 560 ms. | | Native end-of-turn for conversational / duplex English | parakeet-eou-120m-v1 | Emits <EOU>; smallest Parakeet (~132 MiB). Pair with TDT when you need broader language coverage and EOU. | | Fast English-only, no punctuation | parakeet-ctc-0.6b | Lowest decode cost in the Parakeet family; no PnC. | | Indic-language ASR (Hindi and other Indic ids) | indic-conformer-ctc | Pass parakeetConfig.language (e.g. "hi"). Same Parakeet engine; GGUF lives under indic_conformer/ in the registry. | | Offline 4-speaker diarization | sortformer-4spk-v1 | Default offline diarization head. | | Spanish or Chinese transcript with speakers and timestamps in one pass, spelling your names and terms | moss-transcribe-diarize-q8_0.gguf (engine: 'moss-transcribe') | Whole recordings only (no streaming); run(audio, { hotwords }) biases the spelling of proper nouns and domain terms per request. | | Streaming 4-speaker diarization | diar_streaming_sortformer_4spk-v2.1 | AOSC keeps speaker slots across silence; prefer over v1 for live streams. | | Offline or streaming diarization with up to 8 speakers | Nemotron-3-Diarization.q8_0.gguf | Use the official GGUF with the Parakeet engine; the model type is detected automatically. | | Broadest language set + translate-to-English | ggml-large-v3-turbo.bin (or ggml-small.bin on edge) | Whisper: ~99 languages, translation, Silero-VAD live capture. Turbo is the accuracy/speed sweet spot; use tiny/base only when size dominates. | | Live capture with VAD segmentation (Whisper path) | Whisper ASR model + ggml-silero-v5.1.2.bin | Silero VAD is required for Whisper runStreaming(). |

Engine vs model

| Engine | Prefer when… | Prefer the other when… | | --- | --- | --- | | Parakeet | Low-latency streaming, native EOU, diarization, English / ~25-lang product ASR | You need Whisper’s language breadth or translate-to-English | | Whisper | Multilingual offline, translation, VAD-segmented live capture on the whisper.cpp path | You need Parakeet EOU / Sortformer diarization or tighter streaming RTF |

Always pass config.engine (or top-level engine) explicitly in library and SDK code — see Engine Selection.

Parakeet TDT streaming

For Parakeet TDT v3, leave both the load-time and per-call decode windows unset to use the 30,000 ms default. The SDK fields are modelConfig.streamingChunkMs and parakeetStreamingConfig.chunkMs. When using the addon directly, leave parakeetConfig.streamingChunkMs unset or set it to 0, and omit chunkMs in runStreaming(). Omitting only the per-call value inherits any explicit load-time override. Explicit decode windows below 30,000 ms are rejected for offline TDT models because they can drop phrases. Keep the default 10,000 ms left context and 2,000 ms right lookahead. First output typically needs one decode window plus lookahead. You can still write small PCM chunks, and closing the stream flushes the remaining audio. Full TranscribePsy EU uses its own streaming defaults.

The standard TDT ggml encoder masks right-padding in attention and convolution so padded tails cannot alter valid encoder frames. Offline TDT push streaming still re-encodes windows, so transcript accuracy can vary with window context.

Supported Platforms

| Platform | Architecture | Min Version | Status | GPU Support | |----------|-------------|-------------|--------|-------------| | macOS | arm64, x64 | 14.0+ | ✅ Tier 1 | Metal | | iOS | arm64 | 17.0+ | ✅ Tier 1 | Metal | | Linux | arm64, x64 | Ubuntu-22+ | ✅ Tier 1 | Vulkan; CUDA | | Android | arm64 | 12+ | ✅ Tier 1 | Vulkan, OpenCL (Adreno) | | Windows | x64 | 10+ | ✅ Tier 1 | Vulkan; CUDA |

Dependencies:

  • qvac-lib-inference-addon-cpp — C++ addon framework (vcpkg port; version pinned in vcpkg.json)
  • @qvac/fabric — the shared ggml runtime the addon links, with every GPU backend it ships (npm dependency)
  • Speech source — pinned native Whisper and Parakeet engines, built against npm Fabric headers
  • Bare runtime — see engines.bare in package.json
  • Linux requires Clang/LLVM 22 with libc++

The ggml runtime is the shared @qvac/fabric prebuild: the addon links it dynamically (DT_NEEDED qvac__fabric-<host>@0.bare), ships no ggml of its own, and shares one runtime in memory with every other fabric addon in the process. Speech engines are compiled into each addon from the checksum-pinned source in speech-source.json, using only the headers shipped by @qvac/fabric. No speech or ggml vcpkg port is built. See packages/fabric/INTEGRATION.md.

Installation

Make sure the Bare runtime is installed:

npm install -g bare bare-make
bare -v   # must satisfy package.json engines.bare

Then:

npm install @qvac/asr-ggml

Platform packages

@qvac/asr-ggml is a meta package that ships the JavaScript wrapper only. The native prebuild for each desktop host lives in a version-locked platform package selected at install time through os/cpu filtered optionalDependencies:

| Host | Package | | --- | --- | | linux-x64 (glibc) | @qvac/asr-ggml-linux-x64 | | linux-arm64 (glibc) | @qvac/asr-ggml-linux-arm64 | | darwin-arm64 | @qvac/asr-ggml-darwin-arm64 | | darwin-x64 | @qvac/asr-ggml-darwin-x64 | | win32-x64 | @qvac/asr-ggml-win32-x64 |

Do not depend on desktop platform packages directly. Supported installers are npm 7+, pnpm, bun, and Yarn Berry. Yarn v1 and --omit=optional installs skip the platform package and fail at require time, and at bare-pack time, naming the missing package. Each platform package is an ordinary Bare addon whose prebuilds/<host>/ holds the native module. The ggml runtime it links and the dynamically loaded ggml backends ship in the matching @qvac/fabric-<host> platform package, which @qvac/fabric installs the same way. A source build becomes loadable once npm run link:platform (run by npm run build:native) stages it as the host's platform package in node_modules/.

Mobile targets are cross-built, so no install host ever matches their os, and optionalDependencies filtering can never select them. Mobile applications must declare the target's platform package as a direct dependency, pinned to the exact @qvac/asr-ggml version:

| Target | Package | | --- | --- | | android-arm64 | @qvac/asr-ggml-android-arm64 | | ios (device + simulators) | @qvac/asr-ggml-ios |

{
  "dependencies": {
    "@qvac/asr-ggml": "x.y.z",
    "@qvac/asr-ggml-android-arm64": "x.y.z"
  }
}

The runtime follows the same rule: Android and iOS apps also add @qvac/fabric and @qvac/fabric-android-arm64 or @qvac/fabric-ios as direct dependencies at the same exact version.

Quickstart

All four snippets assume:

const fs = require('bare-fs')
const ASRGgml = require('@qvac/asr-ggml')

Audio must be 16 kHz mono. See Audio Input for the accepted shapes.

Whisper — batch run()

const model = new ASRGgml({
  files: { model: './models/ggml-tiny.bin' },
  config: {
    engine: 'whisper',
    whisperConfig: {
      language: 'en',
      audio_format: 's16le'   // how raw Uint8Array bytes are decoded
    }
  }
})

await model.load()

const audioStream = fs.createReadStream('./audio.raw', { highWaterMark: 16000 })
const response = await model.run(audioStream)

// Push-based: segments arrive as whisper.cpp emits them.
await response
  .onUpdate((out) => {
    for (const segment of Array.isArray(out) ? out : [out]) {
      console.log(segment.start, '→', segment.end, segment.text)
    }
  })
  .await()

await model.destroy()

Or pull-based, with iterate() instead of onUpdate():

const response = await model.run(audioStream)
for await (const out of response.iterate()) {
  for (const segment of Array.isArray(out) ? out : [out]) {
    console.log(segment.text)
  }
}

Whisper — VAD streaming runStreaming()

Silero VAD splits the incoming audio into utterances and each one is transcribed as it completes. A VAD model is required — pass it as files.vadModel, config.vadModelPath, or config.whisperConfig.vad_model_path; a missing file throws VAD_MODEL_NOT_FOUND (6018) from the constructor, and a missing path throws VAD_MODEL_REQUIRED (6009) from runStreaming().

const model = new ASRGgml({
  files: {
    model: './models/ggml-tiny.bin',
    vadModel: './models/ggml-silero-v5.1.2.bin'
  },
  config: { engine: 'whisper', whisperConfig: { language: 'en' } }
})

await model.load()

const response = await model.runStreaming(micStream, {
  emitVadEvents: true,      // adds { type: 'vad', speaking, score, source }
  endOfTurnSilenceMs: 800   // adds { type: 'endOfTurn', source: 'vad-silence' }
})

for await (const out of response.iterate()) {
  if (out.type === 'vad') console.log('speaking:', out.speaking)
  else if (out.type === 'endOfTurn') console.log('--- turn ended ---')
  else for (const s of Array.isArray(out) ? out : [out]) console.log(s.text)
}

Parakeet — batch run()

const model = new ASRGgml({
  files: { model: './models/parakeet-tdt-0.6b-v3.q8_0.gguf' },
  config: {
    engine: 'parakeet',
    parakeetConfig: { useGPU: true, maxThreads: 4 }
  }
})

await model.load()

const response = await model.run(float32Samples)   // Float32Array, 16 kHz mono
const segments = []
await response
  .onUpdate((out) => {
    for (const s of Array.isArray(out) ? out : [out]) {
      // `toAppend` marks a segment that continues the previous one rather
      // than replacing it.
      if (s.text && s.toAppend) segments.push(s)
    }
  })
  .await()

console.log(segments.map((s) => s.text).join(''))
await model.unload()

Buffer cap (run() only): every chunk of one run() call is normalized to Float32 and batched into a single native process() call. The cap is 500 MiB of caller-supplied audio — ≈4.55 h of 16 kHz mono s16le (the default byte format) or ≈2.27 h of 16 kHz mono f32le, which needs no expansion on the way to native. Exceeding it raises BUFFER_LIMIT_EXCEEDED (6015), whose message names the source format the budget is denominated in. For longer captures use runStreaming(), which feeds the engine as audio arrives, or split into sequential run() calls.

Parakeet — text per speaker turn

Use an ASR GGUF as the primary model and a separate Sortformer or Nemotron 3 Diarization GGUF in speakerAttribution.modelPath. One instance loads and retains both engines; repeated run() calls reuse them.

const model = new ASRGgml({
  files: { model: './models/parakeet-unified-en-0.6b.q8_0.gguf' },
  config: {
    engine: 'parakeet',
    parakeetConfig: {
      backend: 'cpu',
      speakerAttribution: {
        modelPath: './models/sortformer-4spk-v1.q8_0.gguf'
      }
    }
  }
})

try {
  await model.load()
  const response = await model.run(audio16kMono)
  await response.onUpdate((segments) => {
    for (const { speakerId, start, end, text } of segments) {
      console.log({ speakerId, start, end, text })
    }
  }).await()
} finally {
  await model.unload()
}

The addon composes the native diarization and transcription APIs, transcribes each retained turn and merges adjacent turns from the same speaker when requested. speakerId is zero-based; start and end are seconds in the input recording. This offline mode uses run(); it does not support runStreaming() or streaming: true. Without speakerAttribution, the existing plain ASR and standalone diarization modes are unchanged.

| speakerAttribution option | Native default | Meaning | | --- | --- | --- | | modelPath | required | Separate diarization GGUF. The primary model must support transcription. | | mergeSameSpeaker | true | Merge adjacent retained turns assigned to the same speaker. | | minSegmentMs | 200 | Minimum padded slice duration before sending it to ASR. 0 keeps short turns. | | padSegmentMs | 0 | Extend the ASR audio slice around each turn; returned timestamps still describe the diarized turn. |

Omitted options use the native defaults. Durations must be non-negative integers representable by the native API. Cancellation is checked between diarization and each ASR turn. The existing diarizationThreshold and diarizationMinSegmentMs override the diarizer when explicitly set; if omitted in this mode, the native attributed API owns their defaults. backend applies to both loaded engines. A load fails if either model is unreadable or has the wrong model family.

Runnable example:

bare examples/parakeet-diarized-transcribe.js \
  --asr-model ./models/parakeet-unified-en-0.6b.q8_0.gguf \
  --diar-model ./models/sortformer-4spk-v1.q8_0.gguf \
  --audio ./examples/parakeet-samples/diarization-sample-16k.wav \
  --backend cpu

Parakeet — duplex streaming runStreaming()

runStreaming() opens one long-lived native session for the lifetime of the call and forwards each chunk as it arrives — no batching, no per-chunk session recreation. Speaker IDs stay stable across appends, and an EOU model's <EOU> boundaries surface both as segment.isEndOfTurn and as a native { type: 'endOfTurn', source: 'model-eou', timestamp, chunkIndex, confidence } event. Event timestamps retain the native double precision. Each boundary follows its transcript chunks, including text flushed during finalization, so consumers can submit and clear accumulated text on endOfTurn.

const model = new ASRGgml({
  engine: 'parakeet',                                  // no config → alias form
  files: { model: './models/parakeet-eou-120m-v1.q8_0.gguf' }
})

await model.load()

const response = await model.runStreaming(micStream, { chunkMs: 480 })
await response
  .onUpdate((out) => {
    if (out.type === 'endOfTurn') return console.log('--- turn ended ---')
    for (const s of Array.isArray(out) ? out : [out]) process.stdout.write(s.text)
  })
  .await()

Only one streaming session may be open per instance; a concurrent run() or runStreaming() throws STREAMING_SESSION_ACTIVE (6020).

ASR streaming segments also carry tokenIds, isFinal, chunkIndex and eotConfidence; diarization streaming segments carry isFinal and chunkIndex. Empty final markers are delivered, so use isFinal rather than non-empty text to detect native finality. VAD events include the native chunkIndex (-1 when unavailable). Confidence is the native model value; it may be 0 when there is no EOU confidence for a segment. Plain batch ASR and Whisper do not gain these Parakeet streaming fields.

To inspect every segment and event as JSON:

bare examples/parakeet-streaming-metadata.js \
  ./models/parakeet-eou-120m-v1.q8_0.gguf \
  ./examples/parakeet-samples/sample-16k.wav cpu

Nemotron streams only at the cadences its cache-aware encoder was trained for: 80, 160, 320, 560 or 1120 ms. runStreaming() checks the cadence a run asks for (a positive run-level chunkMs; 0 or unset keeps the load-time streamingChunkMs, where 0 or unset is the 320 ms default) before it opens the session and rejects any other value with INVALID_CONFIG (24015) naming the supported ones, leaving the model usable. A load-time streamingChunkMs the model does not support never reaches runStreaming(): with streaming: true the engine refuses it when the model loads, and load() rejects with FAILED_TO_ACTIVATE (24006) carrying the engine's message. The list is exposed (frozen) for callers that want to validate or offer choices up front:

const ASRGgml = require('@qvac/asr-ggml')
ASRGgml.NEMOTRON_STREAMING_CHUNK_MS // [80, 160, 320, 560, 1120]

A session start the engine itself refuses (for any reason) rejects with FAILED_TO_START_STREAMING (6012, the shared code) carrying the engine's message.

Offline diarization probabilities

Standalone Sortformer and Nemotron diarization can return the native frame-level speaker probabilities alongside the existing text and turns:

const response = await model.run(audio, { includeSpeakerProbabilities: true })
await response.onUpdate(([segment]) => {
  const { values, frames, speakers, frameStrideSeconds } = segment.speakerProbabilities
  // values is a Float32Array; values[frame * speakers + speaker] is the probability.
  console.log({ frames, speakers, frameStrideSeconds, values })
}).await()

This option applies to standalone batch diarization. Omitted or false keeps the compact output. Each call owns its matrix; later jobs and unloading the model do not invalidate it. The geometry comes from the native model.

bare examples/parakeet-diarization-probabilities.js \
  ./models/sortformer-4spk-v1.q8_0.gguf \
  ./examples/parakeet-samples/diarization-sample-16k.wav cpu

Parakeet batch ASR also retains tokenIds. Streaming ASR retains the native fractional encoderMs and decoderMs per segment. Its statistics expose segmentPlanMs and assembleMs for native long-form planning and assembly.

MOSS-Transcribe-Diarize — batch run() with hotwords

const model = new ASRGgml({
  files: { model: './models/moss-transcribe-diarize-q8_0.gguf' },
  config: {
    engine: 'moss-transcribe',
    mossTranscribeConfig: { useGPU: true, maxThreads: 4 }
  }
})

await model.load()

const response = await model.run(float32Samples, {   // Float32Array, 16 kHz mono
  hotwords: ['Tether', 'QVAC', 'vcpkg', 'Parakeet']  // optional, per request
})
await response
  .onUpdate((segments) => {
    for (const s of segments) console.log(`[${s.start}-${s.end}] ${s.speaker}: ${s.text}`)
  })
  .await()

The whole recording is transcribed in one pass, so runStreaming() and reload() reject with NOT_SUPPORTED (6019). Per-call options:

  • hotwords: up to 64 names or terms of up to 64 UTF-8 bytes each, appended to the model's default instruction, so they come out spelled as given;
  • prompt: replaces the default instruction (not combined with hotwords);
  • maxNewTokens: bounds the generated tokens (unset or 0 keeps the model default);
  • onProgress: optional callback receiving { generatedTokens, maxNewTokens } on the JS thread. It reports native token generation, not an audio percentage. A throwing callback cancels the job and rejects its response with that error.
bare examples/moss-transcribe-progress.js ./models/moss-transcribe-diarize-q8_0.gguf ./speech-16k.wav metal

MOSS segments include encoderBackend, the native route for that transcription (ggml, a coreml label, or mixed when a run used both paths). MossTranscribeRuntimeStats describes its token counts and encodeMs, prefillMs, decodeMs, encoderOnCoreml and encoderUsedCoreml statistics.

Engine Selection

The engine is resolved once, in the constructor, from three sources in strict precedence order:

  1. config.engine — authoritative, and the recommended form. If config is supplied at all, it must carry engine; a missing or unrecognized value throws INVALID_ENGINE (6021).
  2. engine — a top-level convenience alias, used only when config is omitted entirely. Unrecognized values throw INVALID_ENGINE.
  3. Model-file sniffing — last resort when neither is given. The first four bytes of files.model are read: GGUF ⇒ parakeet, anything else ⇒ whisper.

Sniffing is a convenience for scripts, not an integration path. It opens the model file synchronously inside the constructor, it cannot distinguish a GGUF whisper build from a GGUF parakeet build, and it throws INVALID_ENGINE if the file exists but cannot be read (a missing file is reported first, as MODEL_NOT_FOUND (24009)). Library and SDK callers should always pass config.engine explicitly.

Validation and sniffing both target the file the driver actually opens: for whisper that is config.path when set, otherwise files.model; parakeet only ever loads files.model.

getEngineType() reports the resolved engine; ASRGgml.ENGINE_WHISPER, ASRGgml.ENGINE_PARAKEET and ASRGgml.ENGINE_MOSS_TRANSCRIBE are available as statics. A MOSS-Transcribe-Diarize GGUF sniffs as parakeet, so pass engine: 'moss-transcribe' explicitly.

API Surface

Every verb has one signature and one meaning regardless of engine.

| Member | Description | | --- | --- | | new ASRGgml({ files, config?, engine?, enableStats?, logger?, exclusiveRun? }) | Resolves the engine, validates model files and the engine config vocabulary. Throws on any problem — nothing is deferred to load(). | | load() | Creates the native instance and activates the model. Calling it on a loaded instance unloads first. Throws INSTANCE_DESTROYED after destroy(). | | run(audio, options?) | Batch transcription. Returns a QvacResponse; drain it with onUpdate(cb) (push) or iterate() (pull). options (hotwords, prompt, maxNewTokens) is moss-transcribe only; the other engines reject a non-empty object. | | runStreaming(audio, opts?) | Duplex/VAD-segmented streaming. Resolves once the native session is open; opts is the engine's streaming vocabulary. | | reload(newConfig?) | Applies an engine-scoped partial config in place where possible. Rejects with NOT_SUPPORTED (6019) on an engine whose driver has no native reload. | | cancel(jobId?) | Cancels the active job and fails it, so a draining iterate() throws. The native verb takes no id; jobId is accepted for source compatibility only. | | status() | Native state string. Before load(), rejects with FAILED_TO_GET_STATUS: 6004 for Whisper and 24004 for Parakeet. | | addon | The native interface, or undefined before load() (not cleared by unload(), as in both pre-merge packages). Escape hatch for a native hard cancel that stops the decode without failing the job (what the SDK's model-wide cancel uses). Not otherwise part of the supported surface. | | unload() / destroy() | Release the model / retire the instance. | | getState() | { configLoaded, weightsLoaded, destroyed }. | | getEngineType() | 'whisper' | 'parakeet' | 'moss-transcribe'. | | getBackendInfo() | BackendInfo or null before load(). Parakeet reports supportsCacheAwareStreaming for the loaded checkpoint. | | pause() / unpause() | Always reject with NOT_SUPPORTED (6019). No engine implements a correct pause/resume. |

Constructor options:

| Option | Default | Description | | --- | --- | --- | | files.model | — | Required. Path to the .bin (whisper) or .gguf (parakeet) checkpoint. Must exist. | | files.vadModel | — | Whisper streaming only: path to the Silero VAD model. Must exist if given. | | config | — | Engine-scoped config; must carry engine when present. | | engine | — | Alias for config.engine, used when config is omitted. | | enableStats | true | Attach RuntimeStats to the job-end payload. | | logger | null | A @qvac/logging LoggerInterface. | | exclusiveRun | true | Serialize run() calls to completion on the inference lane; runStreaming() holds that lane for session setup only. reload/unload/destroy serialize on a separate lifecycle lane, so teardown pre-empts an in-flight run() instead of queueing behind it. |

run() / runStreaming() output payloads are:

  • bare TranscriptionSegment[] (or a single segment) for transcripts — there is no { type: 'segment' } wrapper;
  • { type: 'vad', speaking, score, source, timestamp?, chunkIndex?, speakerId? } for voice-activity events, emitted on each speech/silence change. source is 'silero' (Whisper streaming), 'energy' (Parakeet ASR energy detector; score is the window RMS), or 'sortformer' (Parakeet speaker activity; speakerId names the dominant speaker when speech starts). Parakeet events carry timestamp, in seconds from the start of the session;
  • { type: 'endOfTurn', source, silenceDurationMs?, timestamp?, chunkIndex?, confidence? } for turn boundaries. Parakeet forwards native timing and confidence; Whisper retains its silence-duration payload.

Engine-specific segment fields:

  • Whisper segments carry noSpeechProb, and language whenever whisper reports one (the decoded language, the detected one under language: 'auto'). With token_timestamps: true they add tokens: [{ text, start, end, probability }] (special tokens left out); with tdrz_enable: true on a tinydiarize model they add speakerTurnNext.
  • Parakeet Sortformer keeps the "Speaker N: start - end" text and adds the same data in structured form: a streamed diarization segment carries speakerId, and the offline transcript carries speakerSegments: [{ speakerId, start, end }], one entry per text line.
  • Parakeet with speakerAttribution returns transcription text with speakerId, start, end and isFinal: true for each retained turn.
  • MOSS-Transcribe-Diarize segments carry speaker (the model's "S01", "S02", ... label) and speakerId (the same speaker, 0-based), with start/end in seconds.

Assessing fit

assessFit projects a load against the memory free right now. It reads model metadata and never weight data. The registry publishes a weightless copy of each model, and passing it answers the same as passing the model itself, so the projection can run before the model is downloaded: for parakeet a GGUF without its data, for whisper and its Silero VAD model a GGUF description of the .bin (its settings, vocabulary sizes and tensor list, tens of KB). It is a module export, not an instance method — nothing is loaded to call it.

assessFit returns a Promise. Concurrent calls run one at a time. A model the fitter cannot read, or an invalid request, rejects with the engine's reason as an InvalidArgument error. status is unknown, with no rows, for a load the fitter cannot measure, such as one whose device memory it cannot read.

const ASRGgml = require('@qvac/asr-ggml')

const fit = await ASRGgml.assessFit({
  engine: 'whisper',
  modelPath: '/models/whisper.bin',
  vadModelPath: '/models/silero-vad.bin',
  audioSeconds: 300,
  decoders: 5
})

fit.status // 'fits' | 'does-not-fit' | 'unknown'
fit.devices // the device the load resolves to, then the host CPU
fit.devices[0] // { id, name, unified, usedBytes, freeBytes, totalBytes }
fit.stats // {}

Each device row gives the memory the load takes on that device, as usedBytes, and the device's free and total memory. id is the PCI bus ID when the backend reports one, and the device name otherwise. unified is true for memory the host owns: the CPU, an integrated GPU, a GPU that shares the host's memory, Android's OpenCL GPU, and a device that reports no memory of its own, which takes the host's figures. A load on the CPU is one row that holds both its device and host memory.

On an iOS device every unified row shares the app's own memory limit, os_proc_available_memory(). Each such row's free memory is capped at that limit, and a load whose unified rows together take more than the limit less the margin does not fit. A limit of 0 means the app has none left.

engine picks the fitter and defaults to parakeet.

| Option | Description | | --- | --- | | modelPath | Required. Absolute path to the model, or to the registry's weightless copy where one exists. | | audioSeconds | Longest single transcribe the projection must cover. Required for MOSS; defaults to 300 for whisper and parakeet. | | gpuLayers | Greater than 0 requests the GPU stack, with the fallbacks a real load applies. Omitted, parakeet and MOSS project on the CPU and whisper on the GPU, matching what each load does. | | backend | Parakeet and MOSS: native backend selector, matching the load configuration. Explicit selection overrides gpuLayers. The projection covers one model; assess both models separately for speaker-attributed transcription. | | marginBytes | Free memory that must remain for the projection to count as fitting. Defaults to the engine's own headroom, which is 256 MiB for parakeet and MOSS. | | backendsDir | Directory scanned as given for the ggml backends, the same path a load reads. Unset uses the backends the @qvac/fabric runtime ships. | | vadModelPath | Whisper: projected alongside the model; the VAD model or its weightless copy. Omitted means no VAD. | | decoders | Whisper: worst-case resident decoders, the best_of or beam_size the run will use. The KV cache and decode graph grow with it. | | flashAttn, gpuDevice | Whisper: as the load takes them. | | threads, longFormWindowFrames, longFormContextFrames | Parakeet: as the load takes them. | | nemotronChunkMs | Nemotron: the streaming operating point the projection must also cover. 0 projects the largest allowed one. |

MOSS-Transcribe-Diarize uses an explicit duration and the same per-call options as run:

const fit = await ASRGgml.assessFit({
  engine: 'moss-transcribe',
  modelPath: '/models/moss-transcribe-diarize-q8_0.gguf',
  audioSeconds: 90,
  hotwords: ['QVAC', 'Tether'],
  maxNewTokens: 1024,
  threads: 4,
  gpuLayers: 1
})
console.log(fit.devices)

audioSeconds is required and must be positive and finite. threads follows maxThreads at load time (0 or omitted keeps the existing engine default). prompt, hotwords and maxNewTokens follow the transcription rules, including prompt/hotword exclusion and 0 or omitted token allowance selecting the GGUF default. The projection reads GGUF metadata only and supports a metadata-only copy with the same tensor table and tokenizer. It measures the runtime encoder and decoder graphs, the aligned KV cache, and host buffers. A workload exceeding the model context rejects with workload-too-large.

Encoder and decoder reuse one scheduler allocation, and the device usage counts its peak. This projection covers one batch transcription, the one mode MOSS runs.

Run examples/moss-transcribe-fit.js with:

bare examples/moss-transcribe-fit.js /models/moss-transcribe-diarize-q8_0.gguf 90

Configuration Reference

Configuration vocabularies are engine-scoped — there is no merged config namespace. A key belonging to one engine is rejected, not ignored, by the other, and unknown keys throw at construction time.

Whisper: config.whisperConfig / contextParams / miscConfig

const config = {
  engine: 'whisper',
  contextParams: {
    model: './models/ggml-tiny.bin',
    use_gpu: true,      // opt-in; defaults to false
    gpu_device: 0
  },
  whisperConfig: {
    language: 'en',     // 'auto' for language detection
    duration_ms: 0,
    temperature: 0.0,
    suppress_nst: true,
    n_threads: 0,
    audio_format: 's16le',
    vad_model_path: './models/ggml-silero-v5.1.2.bin',
    vad_params: {
      threshold: 0.6,
      min_speech_duration_ms: 250,
      min_silence_duration_ms: 200
    }
  },
  miscConfig: { caption_enabled: false }
}

The public Whisper keys, including vad_params, are declared by WhisperConfig. The constructor accepts a curated subset of whisper_full_params covering decoder strategy, thresholds, timestamps, VAD, and prompts. WhisperDriver maps vad_params to the native vadParams object; callers must not pass vadParams. Any key outside the list throws from the constructor. contextParams accepts only model, use_gpu, flash_attn, gpu_device; miscConfig only caption_enabled, seed. For what each flag means see the upstream whisper_full_params reference.

Notes:

  • GPU is opt-in. use_gpu defaults to false; set it in contextParams.
  • Four context keys force a full reload — model, use_gpu, flash_attn, gpu_device, main-gpu, main_gpu. Changing any of them destroys and rebuilds the whisper context (seconds, depending on model size). Everything in whisperConfig is applied in place.
  • backendsDir (in whisperConfig) overrides where dynamically-loaded ggml backend libraries are found. See Backends and GPU Acceleration.
  • max_seconds is a convenience that derives duration_ms.
  • carry_initial_prompt: true prepends initial_prompt to every decode window instead of only the first.

Whisper runStreaming(audio, opts) options:

| Option | Description | |--------|-------------| | emitVadEvents / conversationMode | Emit { type: 'vad' } as speech starts and stops. | | endOfTurnSilenceMs | Emit { type: 'endOfTurn' } after this much trailing silence. | | vadRunIntervalMs | How often the VAD is evaluated. |

Parakeet: config.parakeetConfig

const config = {
  engine: 'parakeet',
  parakeetConfig: {
    useGPU: true,
    maxThreads: 4,
    timestampsEnabled: true,
    streaming: false     // true opens a session at load time
  }
}

The authoritative vocabulary is ParakeetConfig in published driver.d.ts — every key is documented inline there, and any key outside it throws INVALID_CONFIG (24015) from the constructor. Groups:

| Group | Keys | | --- | --- | | Compute | maxThreads, useGPU, backend, seed | | Audio | sampleRate (16000), channels (1) | | Output | captionEnabled, timestampsEnabled | | Language | language — multilingual CTC id (e.g. "hi"); required for Indic Conformer GGUFs that advertise parakeet.ctc.lang_* ranges. Full TranscribePsy EU accepts "en" (trunk), "other" (CAFE adapters), or "auto" (gate; also the default when omitted); with "auto" a runStreaming() session buffers its first 20 s for the gate before it emits text, and a shorter one routes when the stream ends. Ignored on monolingual CTC | | Streaming (ASR) | streaming, streamingChunkMs, streamingEmitPartials, streamingEnergyVad, streamingEnergyVadThresholdDb, streamingEnergyVadWindowMs, streamingEnergyVadHangoverMs, streamingLeftContextMs, streamingRightLookaheadMs | | Streaming diarization | streamingHistoryMs, streamingSpeakerVad, streamingSpkCacheEnable, streamingSpkCacheLen, streamingFifoLen, streamingChunkLeftContextMs, streamingChunkRightContextMs, streamingSpkCacheUpdatePeriod | | Diarization, offline and streaming | diarizationThreshold, diarizationMinSegmentMs (defaults: Sortformer 0.641 / 510 ms; Nemotron 3 0.5 / 200 ms) | | Speaker-attributed batch ASR | speakerAttribution: { modelPath, mergeSameSpeaker?, minSegmentMs?, padSegmentMs? }; see text per speaker turn for its native defaults | | Engine | prewarm, prewarmAudioSeconds, longFormWindowFrames, longFormContextFrames | | Backends | backendsDir, openclCacheDir |

The streamingSpkCache* / streamingFifoLen / streamingChunk{Left,Right}ContextMs defaults follow the loaded model's NeMo-port tuning. Omitted left context resolves to 80 ms for Sortformer and 0 ms for Nemotron 3 Diarization; explicitly setting 80 ms retains one Nemotron encoder frame. There is no modelType: the ASR and diarization families, including Nemotron 3 Diarization, are detected from GGUF metadata.

Parakeet runStreaming(audio, opts) options are per-call overrides of the same knobs without the streaming prefix: chunkMs, historyMs, leftContextMs, rightLookaheadMs, emitPartials, emitEnergyVad, energyVadThresholdDb, energyVadWindowMs, energyVadHangoverMs, emitSpeakerVad, diarizationThreshold, diarizationMinSegmentMs, spkCacheEnable, spkCacheLen, fifoLen, chunkLeftContextMs, chunkRightContextMs, spkCacheUpdatePeriod.

Voice-activity events are opt-in. streamingEnergyVad / emitEnergyVad runs the engine's RMS energy detector on CTC, TDT, RNN-T, and Nemotron sessions (EOU models signal turns through <EOU> instead); the threshold is in dBFS (default -35) and the hangover is how long the audio must stay below it before the state returns to silence (default 200 ms). streamingSpeakerVad / emitSpeakerVad reports speaker activity from either diarization model.

prewarm runs one synthetic encoder pass while loading so the first request does not pay the GPU shader or kernel compile. longFormWindowFrames bounds the offline encoder window (0 picks it from the model, a negative value always runs one pass), which keeps memory flat on long run() inputs; cancel() also takes effect between those windows. With 0, TranscribePsy EU-sub gets the 60 s windows with 25 % overlap it recommends (750 frames with 94 frames of context each side); the other models get the engine's balanced automatic windows.

For four-speaker streaming diarization, use the Sortformer v2.1 GGUF. For up to eight speakers, use Nemotron 3 Diarization. Both enable their speaker cache from GGUF metadata. Sortformer v1 remains the four-speaker offline default.

For Nemotron 3 Diarization, longFormWindowFrames sets when offline input switches from one pass to the speaker cache in 30 s chunks. 0 picks 90 s; a negative value always runs one pass, which mixes up speakers past about two minutes and fails past 400 s. With prewarm, the load runs one offline pass and one streaming chunk.

MOSS-Transcribe-Diarize: config.mossTranscribeConfig

| Option | Default | Description | | --- | --- | --- | | maxThreads | 0 | CPU threads (0 lets the engine pick). | | useGPU | false | Select a GPU automatically when backend is auto. | | backend | auto | Native selector: cpu, cuda, vulkan, metal, or an exact ggml device name such as CUDA0, Vulkan0 or MTL0. Explicit selection overrides useGPU and fails at load if unavailable. | | backendsDir | fabric's own | Directory scanned as given for the dynamically loaded ggml backends. Unset uses the directory the @qvac/fabric runtime loads its own backends from. |

For example, mossTranscribeConfig: { backend: 'cuda' } requests CUDA even with the default useGPU: false; { backend: 'cpu', useGPU: true } selects the CPU ggml backend. auto (or an empty selector) preserves automatic selection and fallback. Pass the same backend to assessFit({ engine: 'moss-transcribe', ... }) to project on that device; it overrides gpuLayers. A missing explicit device rejects instead of projecting on the CPU. getBackendInfo() reports the resolved backend after load. CUDA, Vulkan and Metal require compatible native speech-cpp libraries and the corresponding backend in the addon build.

Any other key throws INVALID_CONFIG (24015). Prompt, hotwords and the token bound are per call; see MOSS-Transcribe-Diarize — batch run() with hotwords.

Audio Input

Every engine takes 16 kHz mono audio. run() and runStreaming() accept a stream, an iterable, a single chunk, or an array of chunks. A chunk's class decides how it is interpreted:

| Chunk type | Interpretation | | --- | --- | | Float32Array | f32 samples in [-1, 1] | | Int16Array | s16 samples | | Uint8Array | raw bytes, decoded as s16le by default; whisper's whisperConfig.audio_format: 'f32le' switches the byte interpretation |

audio_format accepts 's16le', 'f32le' and 'decoded' (an alias for 'f32le'); anything else throws INVALID_AUDIO_FORMAT (24010) rather than being decoded as little-endian s16. It only ever describes raw Uint8Array bytes — it never reinterprets a typed array.

A byte length that is not a whole number of samples raises INVALID_AUDIO_INPUT (6011). In a stream of byte chunks the check is applied in aggregate, so a sample split across a chunk boundary (arbitrary socket/pipe read sizes) is carried over into the next chunk; only a stream that ends mid-sample is rejected.

Backends and GPU Acceleration

For Parakeet, parakeetConfig.backend accepts the native selector unchanged: auto, cpu, cuda, vulkan, opencl, webgpu, metal, or an exact ggml device name such as CUDA1 or MTL0. An explicit selector overrides useGPU and fails at load if unavailable; it does not silently retry on CPU. Omitted, empty and auto selectors preserve existing automatic selection and fallback. A selector requires the corresponding backend to be built and available on the host. getBackendInfo() reports the resolved device. Use the same backend in the Parakeet assessFit request. Core ML sidecars retain their existing native routing; selecting a ggml device does not control Core ML placement.

GPU backends come with the @qvac/fabric runtime; the addon has no backend build option of its own and speech-cpp is built without backend features:

  • Linux / Windows — Vulkan, plus CUDA on linux-x64, linux-arm64 and win32-x64, as runtime-loaded modules next to the runtime
  • Android — Vulkan + OpenCL (Adreno) as dynamically-loaded .so backends shipped with @qvac/fabric-android-arm64
  • macOS / iOS — Metal, linked into the runtime, plus the optional Parakeet Core ML encoder sidecars

CUDA (Linux / Windows on NVIDIA) comes with the @qvac/fabric runtime on linux-x64, linux-arm64 and win32-x64 as a runtime-loaded module (.so on Linux, .dll on Windows), next to the per-arch CPU-variant and Vulkan modules; only the CUDA module depends on the CUDA runtime. Engaging CUDA requires the NVIDIA driver plus the CUDA 13 runtime libraries (cudart and cuBLAS) resolvable at load time; hosts that cannot resolve them — including CPU-only and non-NVIDIA machines — skip the module and fall back to Vulkan or CPU instead of failing to load the addon. CUDA ships alongside Vulkan rather than replacing it; ggml registers CUDA ahead of Vulkan, so a use_gpu / useGPU request lands on CUDA when a supported device is present and falls back to Vulkan otherwise. Every engine reports the winner through getBackendInfo() as backendId: 2 (BackendId.CUDA).

On x64 the CUDA module targets compute capability 7.5 and newer, with native code for Turing (7.5 — RTX 20xx, GTX 16xx, T4), Ampere (8.0, 8.6), Ada (8.9), Hopper (9.0) and Blackwell (12.0, 12.1). Anything newer JIT-compiles from the bundled 8.0 PTX on first use, a one-off compile the driver caches. On linux-arm64 the native set is Jetson Orin (8.7), Grace-Hopper (9.0) and GB10 / DGX Spark (12.1), with discrete Ampere+ cards and newer parts covered through the bundled 8.0 PTX. Volta and Pascal fall outside CUDA 13's support entirely, so they have no code path here: the backend skips such devices at registration and the addon falls back to Vulkan or CPU.

The addon takes no direct CUDA linkage — the CUDA module carries its own CUDA DT_NEEDED entries, which is what makes the graceful fallback possible.

Every engine defaults to CPU: whisper needs contextParams.use_gpu: true, parakeet needs parakeetConfig.useGPU: true and moss-transcribe needs mossTranscribeConfig.useGPU: true.

For Whisper GPU selection, set contextParams['main-gpu'] (or the alias contextParams.main_gpu) to a raw ggml registry index, an integer string, 'dedicated', or 'integrated' (class names are case-insensitive). With GPU enabled and no explicit selector, dedicated GPUs are preferred. A class selector is strict: if that class is unavailable, execution falls back to CPU. An in-range numeric selector preserves its registry identity before backend filtering; a CPU, excluded backend, or refused Adreno Vulkan slot falls back to CPU without selecting another GPU. An out-of-range index logs a warning and uses normal selection. The supported local families are Metal, CUDA, Vulkan, and OpenCL; the existing Adreno OpenCL guard still applies.

main-gpu does not enable GPU execution by itself. use_gpu: false always selects CPU. The legacy contextParams.gpu_device retains its existing Whisper GPU/IGPU-ordinal meaning and Adreno guard. Combining it with either new selector spelling, or supplying both new spellings, is rejected.

This selector currently applies to the Whisper engine.

getBackendInfo() reports the initialized backend — backendName, backendId (see the BackendId enum), string backendDevice, backendDescription, encoderBackend, encoderOnCoreml (Apple: whether the engine loaded a Core ML encoder sidecar; see Core ML encoder sidecars), and modelType ('whisper', or the Parakeet family detected from the GGUF: 'ctc', 'tdt', 'rnnt', 'eou', 'nemotron', 'sortformer', 'nemotron-diarization', or 'moss-transcribe'). Whisper additionally reports gpuMemTotalMb / gpuMemFreeMb. This differs from RuntimeStats.backendDevice, which is the native numeric device-class code.

The addon has no WebGPU build option of its own, and the @qvac/fabric runtime does not ship the Dawn WebGPU backend yet, so an explicit backend: 'webgpu' is rejected as an unavailable backend. BackendId.WebGPU is 5. An unavailable explicit Parakeet/MOSS backend fails instead of silently falling back. Hexagon is not included in JavaScript package builds.

The Apple coreml feature also enables Whisper's encoder, retaining native fallback when a matching sidecar is absent. encoderOnCoreml comes from the loaded native state; it does not assert that Apple selected the ANE for every operation. MOSS reports both loaded-sidecar state and per-call routing.

Two paths matter on Android and Linux:

  • backendsDir (in whisperConfig / parakeetConfig) — directory scanned, as given, for dynamically-loaded ggml backend libraries (CUDA, Vulkan, OpenCL, per-arch CPU variants). Unset uses the directory the @qvac/fabric runtime loads its own backends from (prebuilds/<host>/qvac__fabric-<suffix>/ of the installed platform package, or next to the runtime in a bare-linked app). Pass a path only when backend libraries ship somewhere else. No-op on Apple, where backends are linked into the runtime.
  • openclCacheDir (parakeet) — persistent directory for ggml-opencl's compiled program-binary cache. Android-only; pass the host app's cache directory to avoid a cold clBuildProgram on every process start.

Core ML encoder sidecars (Apple)

The macOS and iOS prebuilds enable Core ML, so a Parakeet model can run its FastConformer encoder on Apple Core ML (the Neural Engine) while mel preprocessing and the decoder or speaker head stay on the ggml backend. It is opt-in by presence: at load() the engine looks for a compiled <stem>-encoder.mlmodelc next to the GGUF, where <stem> is the GGUF name with its quantization suffix stripped, so one sidecar serves every tier (parakeet-tdt-0.6b-v3.q8_0.gguf and .f16.gguf both resolve to parakeet-tdt-0.6b-v3-encoder.mlmodelc). The NVIDIA models ship without sidecars, so a model directory behaves as before until you stage one; TranscribePsy publishes its Core ML distribution ready-made (see the table). A missing sidecar, an input shape it does not take, or a failed prediction falls back to ggml, and PARAKEET_COREML_DISABLE=1 in the process environment forces ggml.

| Model | Sidecar | Inputs it takes | Runs on ggml instead | | --- | --- | --- | --- | | TDT (parakeet-tdt-0.6b-v3) | <stem>-encoder.mlmodelc | inputs up to the compiled capacity (typically 15 s); shorter inputs are zero-padded | oversized inputs use ggml unless the export has a validated seam policy | | Unified (parakeet-unified-en-0.6b) | <stem>-encoder.mlmodelc | run(), padded to capacity or split into overlapping windows | runStreaming(), which uses the cache-aware encoder | | TranscribePsy (transcribepsy-250m-eu-sub-coreml.gguf, the encoder-less GGUF of the Core ML distribution) | <stem>-encoder.mlmodelc and <stem>-decoder.mlmodelc | any length: 15 s Neural Engine windows with 1.28 s of seam context; the TDT decoder runs on the Neural Engine as well | never: without its encoder sidecar that GGUF fails to load, since it carries no encoder weights. The full transcribepsy-250m-eu-sub.gguf behaves like TDT | | Full TranscribePsy EU (transcribepsy-250m-eu) | <stem>-encoder.mlmodelc (English trunk), <stem>-encoder-other.mlmodelc (adapters) and <stem>-encoder-gate.mlmodelc (language gate); optionally <stem>-decoder.mlmodelc. Streaming and unwindowed runs also need the FP32 programs: <stem>-encoder-flexible.mlmodelc, <stem>-encoder-other-flexible.mlmodelc and <stem>-encoder-gate-flexible.mlmodelc, plus on macOS the optional fixed <stem>-encoder-fp32-<frames>.mlmodelc and <stem>-encoder-other-fp32-<frames>.mlmodelc | run() of any length: 15 s Neural Engine windows for the selected route, and the first 20 s on the gate sidecar when language is "auto". runStreaming() and longFormWindowFrames < 0 use the FP32 programs, on the GPU on macOS when a fixed capacity fits and on Core ML CPU otherwise and on iOS. The decoder sidecar batches only long offline inputs with automatic windows | when a sidecar is missing, was exported for another model or route (EU-sub bundles included) or fails a prediction: the GGUF keeps the whole encoder | | EOU (parakeet-eou-120m-v1) | <stem>-encoder.mlmodelc | inputs of exactly the compiled mel length | every other length, including streaming windows of a different length | | Sortformer v2.1 + AOSC, whole network | <stem>-diarizer-<frames>.mlmodelc, one fixed capacity per bundle (410 frames covers the default AOSC slab and batch inputs up to 32.8 s) | batch inputs and AOSC steps of up to its capacity: the conformer encoder, speaker transformer and head run on Core ML, the smallest capacity that fits is used and padded rows are masked | longer batch inputs, and every call if the bundle fails | | Sortformer v2.1 + AOSC, encoder only | <stem>-encoder.mlmodelc (batch), <stem>-encoder-bypass-pre-encode.mlmodelc (AOSC) | used when no diarizer bundle covers the call. Batch: exactly the compiled length; AOSC: slabs up to the masked capacity (410 encoder frames for the default geometry) | other batch lengths, larger AOSC slabs; the speaker head always | | Nemotron 3 Diarization (Nemotron-3-Diarization) | <stem>-diarizer-<frames>.mlmodelc, one fixed capacity per bundle (358 frames covers offline inputs up to 28.6 s and the default live chunk, 745 the 30 s long-form blocks and offline inputs up to 59.6 s) | offline, long-form and live calls of up to a capacity: the whole network runs on Core ML, with the smallest capacity that fits | calls above every capacity, and every call if the bundle fails | | CTC (parakeet-ctc-0.6b), Indic Conformer CTC | none in the pinned speech-cpp | — | always (the engine adds CTC sidecars from speech-cpp 2026-09-24) | | Sortformer v1 | none | — | always | | Whisper | <model-stem>-encoder.mlmodelc beside the GGML model (for example, ggml-tiny-encoder.mlmodelc beside ggml-tiny.bin), enabled by speech-cpp[whisper,coreml] on Apple | the encoder's fixed mel window | when the matching sidecar is absent or cannot be loaded; the decoder always stays on ggml | | MOSS-Transcribe-Diarize | moss-transcribe-diarize-encoder.mlmodelc | every 30 s window: the audio encoder and adaptor run on Core ML, the decoder on ggml | only on fallback |

On macOS 15 and iOS 18 or later, the full TranscribePsy EU model also accepts <stem>-encoder-shared.mlmodelc beside the GGUF. The engine discovers the bundle automatically and uses its named en, other, and gate functions in place of the three fixed encoder sidecars. An unavailable or incompatible shared bundle falls back to the separate sidecars, then to ggml when the GGUF contains encoder weights. Keep the FP32 programs for streaming and unwindowed runs. The engine source includes the exporter and merger described in the shared-weight deployment guide.

For standard TDT, fixed-shape exports with mel_valid_mask isolate the padding on short clips. Legacy single-input sidecars still load and need re-exporting to get that padding mask.

Diarizer bundles load on first use, and each capacity costs 190-220 MiB of weights. They pay off on base and Pro chips and iOS (1.4-2.7x over Metal on an M4). A Max or Ultra GPU is as fast as the Neural Engine (0.70-1.17x on an M3 Ultra), so leave them out there. PARAKEET_COREML_DIARIZER_DISABLE=1 ignores them and keeps the encoder-only sidecars. assessFit counts the bundles a workload can load in the host row. Diarizer bundles are not in the model registry yet: export them with engines/parakeet/scripts/export-nemotron-diarization-coreml.py and export-sortformer-diarizer-coreml.py. The Parakeet backends guide gives the commands and the measured speedups.

getBackendInfo().encoderOnCoreml (with encoderBackend: 'coreml') and RuntimeStats.encoderOnCoreml report that a sidecar loaded at load(), not that a given call ran on it: an EOU input of another length, a Unified runStreaming() session, or a failed prediction still runs the encoder on ggml with the flag set. For what a job actually did, read RuntimeStats.encoderUsedCoreml: 1 when every offline ASR transcription and batch diarization in the job ran its encoder on Core ML, 0 when any ran on ggml, such as a diarization longer than every staged diarizer bundle. A speaker-attributed job counts its transcription passes. RuntimeStats.decoderUsedCoreml reports the TDT decoder sidecar the same way: 1 when every offline transcription in the job decoded on Core ML, 0 when any decoded on ggml. 0 is the usual value for short inputs, because the engine batches the decoder on Core ML only once a recording splits into enough segments; jobs without an offline transcription omit the field. The addon does not collect per-segment routing for streaming, so both fields are absent after streaming jobs. Export sidecars with engines/parakeet/scripts/export-encoder-coreml.py, preferably from an f16 or f32 GGUF (a quantized source works, but its rounding is baked into the sidecar every tier shares), from the qvac-fabric-speech.cpp tree at the ref speech-source.json pins; its Parakeet backends guide has the per-model export commands. The Core ML RTF lanes record what the TDT sidecar gains over Metal.

The full TranscribePsy EU model reads two more switches from the process environment at load(). PARAKEET_COREML_COMPUTE_UNITS (cpu_and_ane, all, cpu_and_gpu or cpu_only) chooses where Core ML runs; the placements without the Neural Engine use the FP32 programs. `P