Skip to content

PERF: Move Nemotron ASR execution into a dedicated worker #11

Description

@MikeSchirtzinger

Problem

Nemotron load, warm-up, and chunk decode run through the main page path. That competes with UI rendering, timers, transcript DOM work, and notes scheduling. Whisper already uses a worker-backed executor pattern.

Evidence

  • index.html:3674-3693 imports nemotron-engine.js, constructs NemotronEngine, and awaits load() from the main app path.
  • index.html:3720-3723 feeds captured samples directly to the engine from the capture callback.
  • nemotron-engine.js:168-205 loads model bytes, builds ORT sessions, and warms up the engine.
  • nemotron-engine.js:286-302 drains and decodes chunks via engine.transcribeChunk.
  • whisper-engine.js:122-135 shows the existing worker executor pattern.

Acceptance criteria

  • Move Nemotron model load/create/feed/finalize/stats execution behind a dedicated worker protocol.
  • Keep main-thread API compatibility for startNemotron(), pause/resume, stop/finalize, status, text events, and stats.
  • Use transferables or batching so audio-post overhead does not erase the benefit.
  • Preserve transcript ordering and finalization guarantees.
  • Validate with real audio and PerfMonitor before/after evidence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions