Skip to content

Captions fail on trimmed recordings: Parakeet transcribes full untrimmed audio and crashes on >~6.5 min (ONNX broadcast error 3042 by 8042) #2719

Open

Description

@Neat-Snap

Note: This issue was AI-generated. It was written by an AI assistant (Claude) that debugged the problem on my machine by reading Cap's logs and project files.

Description

Generating captions with either Parakeet model (parakeet-best or parakeet-best-max) fails on a recording that has been trimmed to ~2 minutes. The error:

Failed to process audio with Whisper: Parakeet transcription failed: ONNX Runtime error: Non-zero status code returned while running Add node. Name:'/layers.0/self_attn/Add_2' Status Message: .../onnxruntime/core/providers/cpu/math/element_wise_ops.h:540 void onnxruntime::BroadcastIterator::Init(ptrdiff_t, ptrdiff_t) axis == 1 || axis == largest was false. Attempting to broadcast an axis by a dimension other than 1. 3042 by 8042

There seem to be two problems:

1. Caption generation transcribes the full source audio, not the trimmed timeline.

  • project-config.json timeline: one segment, start: 515.32, end: 626.59 → ~111 s kept.
  • Source audio content/segments/segment-0/audio-input.m4a / system_audio.m4a: 643.4 s.
  • Even when it doesn't crash, this transcribes audio the user deleted and the caption timings would presumably not line up with the edited timeline.

2. Parakeet crashes on long audio because it isn't chunked.

  • 643 s at Parakeet's 80 ms per encoder frame (10 ms hop × 8 subsampling) ≈ 8,042 frames, which matches the 8042 in the error.
  • 8042 - 3042 = 5000, which suggests the exported model's relative positional encoding covers ~5000 frames (≈6.5 min of audio). Inputs longer than that make the shapes mismatch in the first self-attention layer. (This part is inferred from the numbers, not verified against the model graph.)
  • Both models fail with the identical 3042 by 8042 mismatch, and both were freshly re-downloaded and loaded fine (Parakeet TDT model loaded successfully), so it isn't a corrupt download.

Expected: captions are generated for the trimmed timeline only, and long audio is split into chunks that fit the model's max length.

Reproduction

  1. Record a screen recording with mic audio longer than ~7 minutes (mine was ~10:43).
  2. In the editor, trim it down to ~2 minutes.
  3. Download a Parakeet transcription model and click generate captions.
  4. Captions fail with the error above.

Additional Context

  • Cap version: 0.6.0
  • Operating system, version: macOS 15.7.7
  • Device (optional): Apple Silicon (arm64)

Relevant log lines (~/Library/Logs/so.cap.desktop/cap-desktop.log.*):

INFO cap_desktop_lib::captions: Model directory: .../so.cap.desktop/transcription_models/parakeet-best
INFO cap_desktop_lib::captions: Loading Parakeet TDT model from: .../transcription_models/parakeet-best
INFO cap_desktop_lib::captions: Parakeet TDT model loaded successfully
ERROR cap_desktop_lib::captions: Failed to process audio with Whisper: Parakeet transcription failed: ONNX Runtime error: ... Name:'/layers.0/self_attn/Add_2' ... Attempting to broadcast an axis by a dimension other than 1. 3042 by 8042

Side note: the error message says "Failed to process audio with Whisper" even though the Parakeet model is being used.

🤖 Generated with Claude Code

Activity

  1. linear commented on Oct 19, 2026

    @linear
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions