{"record":{"id":"9a7db47ad51c8f62","repo":"mudler/LocalAI","slug":"error-transcription-failed","errorCode":null,"errorMessage":"error: transcription failed\n","messagePattern":"error: transcription failed\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/go/whisper/cpp/gowhisper.cpp","lineNumber":184,"sourceCode":"  // Only install the new-segment callback when streaming is requested\n  // (Go side calls set_new_segment_callback before transcribe()). Leaving\n  // it always-on is harmless but adds a function-pointer dispatch per\n  // segment for the offline path.\n  if (g_go_new_segment_cb.load(std::memory_order_relaxed) != 0) {\n      wparams.new_segment_callback = new_segment_cb;\n      wparams.new_segment_callback_user_data = nullptr;\n  }\n  wparams.abort_callback = abort_cb;\n  wparams.abort_callback_user_data = nullptr;\n\n  fprintf(stderr, \"info: Enable tdrz: %d\\n\", tdrz);\n  fprintf(stderr, \"info: Initial prompt: \\\"%s\\\"\\n\", prompt);\n\n  if (whisper_full(ctx, wparams, pcmf32, pcmf32_len)) {\n    if (g_abort.load(std::memory_order_relaxed)) {\n      return 2;   // aborted by client\n    }\n    fprintf(stderr, \"error: transcription failed\\n\");\n    return 1;\n  }\n\n  *segs_out_len = whisper_full_n_segments(ctx);\n\n  return 0;\n}\n\nconst char *get_segment_text(int i) {\n  return whisper_full_get_segment_text(ctx, i);\n}\n\nint64_t get_segment_t0(int i) { return whisper_full_get_segment_t0(ctx, i); }\n\nint64_t get_segment_t1(int i) { return whisper_full_get_segment_t1(ctx, i); }\n\nint n_tokens(int i) { return whisper_full_n_tokens(ctx, i); }\n","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/whisper/cpp/gowhisper.cpp#L166-L202","documentation":"Whisper transcription failed on the input audio. Guard: validate audio input (non-empty, supported sample rate/format) before inference; propagate the failure reason in the response.","triggerScenarios":"Thrown at backend/go/whisper/cpp/gowhisper.cpp:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the input audio is valid and in a supported format.","Check whisper.cpp logs for the underlying decode error.","Retry with a shorter clip or different model to isolate the failure."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}