bunsen-tool 0.43.0

bunsen's models on the command line: speech to text (Parakeet, Qwen3-ASR, Voxtral Realtime, Whisper) and who spoke when (Sortformer), text to speech (ZONOS3, Qwen3-TTS), chat (Qwen3, Qwen3.5, Gemma, nanochat) and typed decisions (Laya). The chat driver is also a library, `bunsen_tool::chat`.
Documentation
# The ASR construct: what `bunsen-tool asr transcribe` and `asr live` run,
# by what the speech is for rather than which model does it. Embedded in the
# binary and read once (`construct::catalog`).
#
# A model is chosen by the built-in catalog's selection pipeline among every
# speech family's builds, by their tags (`language`, `translate`, `parameters`,
# `scores`), each build also carrying the keys the construct derives:
# `$wer_en` (`scores`' `wer.en`) and `$multilingual` (a `language` of more
# than one tag, or `"*"`).
#
# - `axes`: what a need is, each with what it decides.
# - `presets`: names for the needs people ask for (`--preset`), each a need and
#   the stages that choose its model; `default` is an alias, so what it means
#   can change.
# - `selection`: the default stages every preset's follow.
# - `order`: the last stage's order, after everything else.
# - `qualities` and `modes`: what `--quality` and the mode (`live`) add: stages
#   (`run`; a cap on the model's size where speed matters), or an `order` in
#   place of the default's.
# - `implications`: a need that is served as another.
# - `engines`: what a family's engine takes from the command line; a family
#   not named finds the language itself and only transcribes.
# - `language`: the speech `--language` implies, by its code; a `--speech`
#   given with it must hear that speech (`multi` hears English).
# - `vad`: the VAD slot's filler, as a lookup expression: what finds the
#   speech regions of every emission but `offline` (`--vad` replaces it).
# - `recipes`: how each family runs in each mode: the emission, the push size,
#   and a patch over the chosen model (Whisper's beam).

axes:
  - name: speech
    description: "what the speech is"
    members:
      - { name: en, description: "English" }
      - {
        name: multi,
        description: "any language a model finds from the speech; English among them",
       }
  - name: task
    description: "what to make of the speech"
    members:
      - { name: transcribe, description: "text in the language spoken" }
      - { name: translate, description: "English text" }
  - name: quality
    description: "how much compute to spend on it"
    members:
      - { name: fast, description: "less compute: a model of at most 1B parameters" }
      - { name: balanced, description: "the default" }
      - { name: good, description: "more compute: the larger model among equals" }

presets:
  - name: en
    aliases: [default]
    description: "English: NVIDIA's Parakeet TDT, as FermionResearch's Phonon-2; each word timed"
    need: { speech: en, task: transcribe, quality: balanced }
    selection: [{ keep: { language: en } }]
  - name: multi
    description: "Any of 30 languages, found from the speech: Qwen's Qwen3-ASR (1.7B; 0.6B live)"
    need: { speech: multi, task: transcribe, quality: balanced }
    selection: [{ keep: { $multilingual: true } }]
  - name: translate-en
    description: "Any of Whisper's languages, translated to English text: OpenAI's Whisper
      (large-v3-turbo was not trained to translate)"
    need: { speech: multi, task: translate, quality: balanced }
    selection: [{ keep: { translate: true } }]

selection:
  # Each release sequence's newest, weighted first.
  - { weigh: { by: [{ release: latest }] }, as: latest }

# The heaviest first; then the lowest published English error rate, a model
# without one after those with; then the smallest.
order: [{ desc: $weight }, { asc: $wer_en }, { asc: parameters }]

qualities:
  # Less compute: no model above 1B parameters.
  fast: { run: [{ keep: { parameters: { le: 1.0e9 } } }] }
  # More compute: the larger first among equals.
  good: { order: [{ desc: $weight }, { asc: $wer_en }, { desc: parameters }] }

modes:
  # Keeping up with the microphone: no model above 1B parameters (Qwen3-ASR-1.7B
  # takes about 2.5x the 0.6B's time, too slow to keep up live).
  live: { run: [{ keep: { parameters: { le: 1.0e9 } } }] }

implications:
  # Translating English to English is out of every model's training, and
  # Whisper's output for it is its transcript.
  - when: { speech: en, task: translate }
    then: { task: transcribe }
    reason: "English speech translated to English is transcribed"

engines:
  whisper:
    # `--language` joins the model's patch under this key.
    language: language
    # The tasks its models do: each one's preset in the model's box (the
    # default's is left out, as the task axis's default), and the patch key
    # and values that set it too (a patch wins over the box).
    tasks:
      default: transcribe
      presets: { transcribe: transcribe, translate: translate }
      patch: { key: task, values: { transcribe: Transcribe, translate: Translate } }

language:
  # A code (case aside) and the speech it is; any other code is `otherwise`.
  speech: { en: en }
  otherwise: multi

# Silero's VAD under `faster-whisper`'s policy: 2 s of silence closes a
# region, 400 ms pads it.
vad: "silero/vad-16k[faster-whisper]"

recipes:
  parakeet:
    offline: { emission: offline, chunk_ms: 1000 }
    live: { emission: conservative, chunk_ms: 250 }
  qwen3-asr:
    offline: { emission: offline, chunk_ms: 1000 }
    live: { emission: conservative, chunk_ms: 250 }
  voxtral:
    offline: { emission: offline, chunk_ms: 1000 }
    live: { emission: conservative, chunk_ms: 250 }
  whisper:
    offline: { emission: offline, chunk_ms: 1000, patch: { beam_size: 5 } }
    live: { emission: conservative, chunk_ms: 250, patch: { beam_size: 1 } }