Skip to content

Live speech-to-text in the composer (NeMo-Speech.cpp) #845

Closed

Description

@currentbits

Approved design: docs/superpowers/specs/2026-09-03-live-speech-to-text-design.md

Private, English-only live microphone dictation in the composer. Partial words appear in the draft while speaking; stop commits the final transcript. Related to #168 (voice dictation) but this issue is the live-transcription path, not a voice-intermediary agent.

Decisions

  • NVIDIA NeMo-Speech.cpp v0.1.0 sidecar (not Parakeet TDT).
  • Model: nvidia/nemotron-speech-streaming-en-0.6b Q8 GGUF (nemotron-speech-streaming-en-0.6b.q8_0.gguf, ~700 MB). Downloaded after explicit confirmation; never shipped in app archives.
  • Capture in the renderer (getUserMedia + AudioWorklet, 16 kHz mono PCM16). Main process owns the sidecar, model files, loopback auth, download, shutdown.
  • One app-wide session. Textarea read-only while recording.
  • Bundle Metal runtime on macOS arm64; CPU on Windows/Linux x64.

Gate (must pass before product code)

Throwaway spike, not merged:

  • live partial + final text on macOS arm64/Metal, Windows x64/CPU, Linux x64/CPU
  • first partial ≤ 1.5s; stop-to-final ≤ 1.5s
  • RTF ≤ 1.0 for 5 minutes; sidecar RSS < 2.5 GB
  • warm-cache transcription with outbound network blocked
  • runtime Apache-2.0 + model NVIDIA Open Model License must permit Solenta's MIT distribution (runtime bundled; model user-downloaded)

If Windows/Linux CPU miss latency/throughput, stop and amend the design. No silent fallback to Python/NeMo or Parakeet TDT.

Product PRs after the gate

  1. speech IPC namespace + speech:changed push (CoderApi, ipcChannels, preload, fakeCoder, devCoder)
  2. electron/speech.js manager, download/verify, sidecar, tests
  3. Composer mic control + AudioWorklet + renderer tests
  4. Packaging, NSMicrophoneUsageDescription, licenses, CI nemo-speech doctor + checked-in WAV gate

Pinned v0.1.0 runtime SHA-256

  • macos-aarch64-metal.tar.gz f1dff4f9dd9c96214f8cb78b982812459132df8a4ad1a42409fd94de4a366244
  • linux-x86_64-cpu.tar.gz 0f74131d631ad2c694cf0ec53490866bb6461147959589a69fb6fc231944065b
  • windows-x86_64-cpu.zip 5e4ea81046012edcd77fd8848de8eefb5a4ba38cc26f52eb544ab184695a75d6

Activity

  1. added
    enhancement
    plan:doing
    on Sep 3, 2026
  2. currentbits commented on Sep 3, 2026

    @currentbits
    OwnerAuthor

    Orchestrator started execution. First step is the throwaway feasibility spike (not merged). Product PRs wait on that gate.

  3. currentbits commented on Sep 3, 2026

    @currentbits
    OwnerAuthor

    Spike worker (thread 3b4108e8) finished. Report: docs/superpowers/plans/2026-09-03-live-speech-to-text-feasibility.md on coder/fork-execute-this-live-speech-to-text-de-3b4108 (f2699588). No product code, no PR.

    SPIKE_VERDICT: PARTIAL

    macOS arm64 Metal live gates passed:

    • first partial 824 ms (6.11 s live phrase), 823 ms (30 s live)
    • stop-to-final 79 ms / 65 ms on live-paced audio
    • 300 s audio max-pace RTF 0.064 (wall 19.1 s); peak RSS 1010.8 MiB
    • /ready device=metal; --no-ui 404s playground; /v1 requires bearer
    • warm-cache sandbox-exec deny-network CLI transcribe succeeded
    • runtime SHA-256 pins matched GitHub asset digests; GGUF sha256 d9a01898…3812d (699,872,960 bytes)

    Linux x64: archive verified; docker --platform linux/amd64 prints --version then SIGILL on doctor/serve (QEMU). Live not-proven. Windows x64: zip+DLLs beside exe verified; live not-proven.

    Licenses: Apache-2.0 runtime may be bundled with NOTICE; NVIDIA Open Model License allows user-download into userData; do not ship the GGUF.

    Protocol gotcha for product: conversation.item.input_audio_transcription.delta is an incremental delta suffix, not a full snapshot. Concatenate; replace the provisional range only on completed.transcript.

  4. currentbits commented on Sep 3, 2026

    @currentbits
    OwnerAuthor

    Spike worker finished PARTIAL on coder/fork-execute-this-live-speech-to-text-de-3b4108 (commit f269958). Not merged.

    macOS arm64 Metal (this machine) — live gates passed

    • First partial: 824 ms (6 s phrase), 823 ms (30 s live). Gate ≤ 1.5 s.
    • Stop-to-final: 79 ms / 65 ms on live-paced audio. Gate ≤ 1.5 s.
    • 300 s audio dumped in 19.1 s wall → RTF 0.064. Peak sidecar RSS 1010.8 MiB.
    • Warm-cache transcribe succeeded under sandbox-exec deny-network.
    • Pins verified. Model sha256 d9a01898d2a611c8764e23a1c2f45e70bbd5a425dc4de93692ac951dd603812d (699,872,960 bytes).
    • Licenses: Apache-2.0 runtime may be bundled (ship LICENSE/NOTICE); GGUF stays user-downloaded under NVIDIA Open Model License.

    Not proven

    • Linux x64 CPU: archive ok; docker --platform linux/amd64 SIGILLs on doctor/serve (QEMU, not a native fail). Do not treat as a backend miss.
    • Windows x64 CPU: zip + DLL set listed; cannot run PE32+ here.

    Design notes for later product PRs

    • Websocket delta events are incremental suffixes, not snapshots. Concatenate, then replace the provisional range on completed.
    • Raise sidecar --read-timeout / --write-timeout above the 30 s default.
    • Windows packaging must copy the full bin/ DLL set, not only nemo-speech.exe.

    Product PRs still blocked on a full three-platform PASS unless we explicitly accept macOS-only first. Native ubuntu-latest / windows-latest still need doctor + one websocket turn + RTF/RSS.

    Report: docs/superpowers/plans/2026-09-03-live-speech-to-text-feasibility.md plus throwaway spike/speech/ helpers.

  5. currentbits commented on Sep 3, 2026

    @currentbits
    OwnerAuthor

    Draft spike PR: #850 (allowOversize). Sending the same worker to add a native ubuntu-latest + windows-latest live-gate workflow on that PR. Product PRs still blocked.

  6. currentbits commented on Sep 3, 2026

    @currentbits
    OwnerAuthor

    Pushed throwaway native CI for Linux/Windows live gates onto PR #850 (9f69977c).

    • workflow: .github/workflows/speech-spike.yml (ubuntu-latest + windows-latest, does not touch test.yml)
    • runner: spike/speech/run-ci.mjs
    • fixture: spike/speech/fixtures/phrase-16k.wav

    Actions: https://github.com/currentbits/solenta/actions/workflows/speech-spike.yml

  7. currentbits commented on Sep 3, 2026

    @currentbits
    OwnerAuthor

    Native Linux x64 CPU and Windows x64 CPU live gates cannot be proven on the Apple Silicon host (QEMU SIGILL; PE32+ cannot run). PR #850 merged the macOS Metal spike report.

    Follow-up: throwaway ubuntu-latest / windows-latest CI on a new PR (do not merge as product). Pins stay as in the feasibility report. No composer/IPC work until those native jobs print first-partial, stop-to-final, and optional RTF/RSS.

  8. 21 remaining items

  9. currentbits commented on Sep 3, 2026

    @currentbits
    OwnerAuthor

    Packaging worker finished on coder/fork-execute-this-live-speech-to-text-de-726531 (3b4374a7), stacked on #865. 6 files, packaging tests 15/15, runtime path is resources/speech/bin (matches electron/speech.js). No on: push GGUF job. Not landed. 881 lines → allowOversize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions