Publish harness and TUI open-source
initial sync from the monorepo
This commit is contained in:
commit
c68e39f604
2734 changed files with 1437016 additions and 0 deletions
18
crates/codegen/xai-grok-voice/src/audio/mod.rs
Normal file
18
crates/codegen/xai-grok-voice/src/audio/mod.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
//! Microphone capture (optional `audio` feature).
|
||||
//!
|
||||
//! Two backends share one interface (`spawn_pcm_capture`,
|
||||
//! `capture_pcm_for_duration`, `CaptureHandle`):
|
||||
//! - non-Linux (macOS/Windows): `cpal` (coreaudio/wasapi), linked into the binary;
|
||||
//! - Linux: a subprocess recorder (`pw-record`/`parec`/`arecord`), because the
|
||||
//! static-musl release binary cannot link `cpal` -> `alsa-sys`. See
|
||||
//! [`capture_linux`] for the full rationale.
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
mod capture;
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
pub use capture::{CaptureHandle, capture_pcm_for_duration, spawn_pcm_capture};
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
mod capture_linux;
|
||||
#[cfg(target_os = "linux")]
|
||||
pub use capture_linux::{CaptureHandle, capture_pcm_for_duration, spawn_pcm_capture};
|
||||
Loading…
Reference in a new issue