{"record":{"id":"6ad344b0c9d7b836","repo":"zeroclaw-labs/zeroclaw","slug":"assemblyai-transcription-timed-out-after-180s","errorCode":null,"errorMessage":"AssemblyAI transcription timed out after 180s","messagePattern":"AssemblyAI transcription timed out after 180s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/transcription.rs","lineNumber":596,"sourceCode":"            match status_str {\n                \"completed\" => {\n                    let text = poll_body[\"text\"]\n                        .as_str()\n                        .context(\"AssemblyAI response missing 'text'\")?\n                        .to_string();\n                    return Ok(text);\n                }\n                \"error\" => {\n                    let error_msg = poll_body[\"error\"]\n                        .as_str()\n                        .unwrap_or(\"unknown transcription error\");\n                    bail!(\"AssemblyAI transcription failed: {}\", error_msg);\n                }\n                _ => {}\n            }\n        }\n\n        bail!(\"AssemblyAI transcription timed out after 180s\")\n    }\n}\n\n// ── GoogleSttProvider ───────────────────────────────────────────\n\n/// Google Cloud Speech-to-Text API transcription_provider.\npub struct GoogleSttProvider {\n    alias: String,\n    api_key: String,\n    language_code: String,\n}\n\nimpl GoogleSttProvider {\n    pub fn from_config(\n        alias: &str,\n        config: &zeroclaw_config::schema::GoogleSttConfig,\n    ) -> Result<Self> {\n        let api_key = config","sourceCodeStart":578,"sourceCodeEnd":614,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/transcription.rs#L578-L614","documentation":"The AssemblyAI poll loop ran for 180 seconds without the job reaching \"completed\" or \"error\", so the provider gave up. The 180-second ceiling is hardcoded in the provider, not configurable. The job may still be running (or even complete) on AssemblyAI's side — only the local wait was abandoned.","triggerScenarios":"AssemblyAI queue latency or a very long audio file keeps the transcript in \"processing\"/\"queued\" for over 180 s; the poll loop exhausts its deadline and bails. Typical for 30+ minute recordings or during AssemblyAI incidents/peak load.","commonSituations":"Transcribing long meetings/calls through AssemblyAI; free-tier accounts with slow queue priority; retrying immediately after a timeout while AssemblyAI is still backlogged.","solutions":["Retry the transcription — short files normally finish well under 180 s, and a retry after a transient backlog usually succeeds","Split long audio into chunks under ~10 minutes each before transcribing","Check status.assemblyai.com and the dashboard queue if timeouts repeat","For consistently long jobs, switch the agent's transcription_provider to a streaming/synchronous provider (Groq, OpenAI, Deepgram) which returns in one request"],"exampleFix":"# split a long recording into 10-minute chunks before transcription\nffmpeg -i meeting.wav -f segment -segment_time 600 -c copy chunk_%03d.wav","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match provider.transcribe(&audio, name).await {\n    Ok(text) => Ok(text),\n    Err(e) if e.to_string().contains(\"timed out after 180s\") => {\n        // job may still complete server-side; one bounded retry is cheap for short files\n        retry_once(|| provider.transcribe(&audio, name)).await\n    }\n    other => other,\n}","preventionTips":["Keep AssemblyAI inputs under ~10 minutes; split longer audio with ffmpeg segment","Remember the 180 s wait is hardcoded — for long media choose a synchronous provider (groq/openai/deepgram)","Check status.assemblyai.com before assuming your code is at fault during timeouts"],"tags":["assemblyai","timeout","polling","transcription","long-audio"],"backgroundTag":"async-job-timeout","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}