{"record":{"id":"ddb908f659663ec6","repo":"Kuberwastaken/claurst","slug":"voice-recording-is-not-available-in-this-build-co","errorCode":null,"errorMessage":"Voice recording is not available in this build (compile with --features voice).","messagePattern":"Voice recording is not available in this build \\(compile with --features voice\\)\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-rust/crates/core/src/voice.rs","lineNumber":377,"sourceCode":"        {\r\n            Ok(text) => {\r\n                let _ = event_tx.send(VoiceEvent::TranscriptReady(text)).await;\r\n            }\r\n            Err(e) => {\r\n                let _ = event_tx\r\n                    .send(VoiceEvent::Error(format!(\"Transcription failed: {}\", e)))\r\n                    .await;\r\n            }\r\n        }\r\n        Ok(())\r\n    }\r\n    #[cfg(not(feature = \"voice\"))]\r\n    {\r\n        let _ = is_recording;\r\n        let _ = config;\r\n        let msg = \"Voice recording is not available in this build (compile with --features voice).\".to_string();\r\n        let _ = event_tx.send(VoiceEvent::Error(msg.clone())).await;\r\n        Err(anyhow::anyhow!(msg))\r\n    }\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// Audio capture (cpal, feature-gated)\r\n// ---------------------------------------------------------------------------\r\n\r\n#[cfg(feature = \"voice\")]\r\nasync fn record_audio(\r\n    is_recording: Arc<AtomicBool>,\r\n    event_tx: mpsc::Sender<VoiceEvent>,\r\n) -> anyhow::Result<(Vec<f32>, u32)> {\r\n    use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};\r\n    use std::time::Duration;\r\n\r\n    let host = cpal::default_host();\r\n    let device = host\r\n        .default_input_device()\r","sourceCodeStart":359,"sourceCodeEnd":395,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/core/src/voice.rs#L359-L395","documentation":"record_and_transcribe is compiled in both feature configurations; without the 'voice' cargo feature the real implementation is cfg'd out and this stub emits the error via the event channel and Result. The feature gate exists so builds without voice deps (cpal, etc.) still compile. Enable the feature or don't invoke voice.","triggerScenarios":"Calling start_recording/record_and_transcribe on a binary built without --features voice (the default build if voice is not a default feature).","commonSituations":"Users installing from package managers get a feature-less build; developer forgot to add --features voice locally; distribution minimized build size by dropping the voice feature.","solutions":["Rebuild with the voice feature: cargo build --features voice.","Install a build that includes voice support.","Guard the voice UI entry point with a feature/availability check so users never hit this path."],"exampleFix":"// before\ncargo build\n./target/debug/claurst --voice\n// after\ncargo build --features voice\n./target/debug/claurst --voice","handlingStrategy":"validation","validationCode":"#[cfg(feature = \"voice\")]\nfn voice_supported() -> bool { true }\n#[cfg(not(feature = \"voice\"))]\nfn voice_supported() -> bool { false }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build/install with --features voice when voice is needed.","Compile-time-gate voice UI so it's invisible in non-voice builds.","Check feature support at startup and message users clearly."],"tags":["voice","compile-time-feature","cargo-features"],"backgroundTag":"feature-not-enabled","analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}