{"record":{"id":"8b42641fb4c1a6ea","repo":"Kuberwastaken/claurst","slug":"voice-capture-is-not-available-in-this-build-reco","errorCode":null,"errorMessage":"Voice capture is not available in this build. Recompile with --features voice to enable microphone access.","messagePattern":"Voice capture is not available in this build\\. Recompile with --features voice to enable microphone access\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/tui/src/voice_capture.rs","lineNumber":138,"sourceCode":"                samples,\r\n                sample_rate,\r\n                stream,\r\n            });\r\n\r\n            // Fire-and-forget: send the event on a background task so we don't\r\n            // need an async context here.\r\n            let tx = event_tx.clone();\r\n            tokio::spawn(async move {\r\n                let _ = tx.send(VoiceEvent::RecordingStarted).await;\r\n            });\r\n\r\n            Ok(())\r\n        }\r\n\r\n        #[cfg(not(feature = \"voice\"))]\r\n        {\r\n            let _ = event_tx;\r\n            Err(anyhow::anyhow!(\r\n                \"Voice capture is not available in this build. \\\r\n                 Recompile with --features voice to enable microphone access.\"\r\n            ))\r\n        }\r\n    }\r\n\r\n    /// Stop the capture stream and return the accumulated samples.\r\n    ///\r\n    /// Returns `(samples, sample_rate)`.  The sample buffer is empty when no\r\n    /// recording was in progress.\r\n    pub fn stop_recording(&mut self) -> (Vec<f32>, u32) {\r\n        match self.capture.take() {\r\n            Some(cap) => {\r\n                // Dropping `cap.stream` stops the cpal callback.\r\n                let rate = cap.sample_rate;\r\n                let samples = cap.samples.lock().unwrap().clone();\r\n                (samples, rate)\r\n            }\r","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/tui/src/voice_capture.rs#L120-L156","documentation":"Compile-time feature guard: start_recording was called in a build without the `voice` feature, so the cpal microphone code is not compiled in and the request is unconditionally rejected. Not a runtime failure — the binary lacks the capability by build configuration.","triggerScenarios":"Thrown at src-rust/crates/tui/src/voice_capture.rs:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rebuild with --features voice to enable microphone capture","Use a build of the TUI that ships the voice feature"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}