Skip to main content

voxkit/
lib.rs

1//! # voxkit — Voice pipeline toolkit
2//!
3//! Provides abstractions for building voice-powered apps in Rust:
4//! - **Audio types** — `AudioChunk`, `Transcript`, `Segment`
5//! - **STT** — Speech-to-text trait + OpenAI backend
6//! - **VAD** — Voice activity detection trait + Silero backend
7//! - **TTS** — Text-to-speech trait + OpenAI backend
8//! - **Mic** — Cross-platform microphone capture via cpal
9//! - **System audio** — macOS system audio capture via ScreenCaptureKit
10//! - **Mic mode** — macOS microphone mode detection
11//! - **TTS player** — Background TTS playback with sentence splitting
12//!
13//! All backends are feature-gated. Core types have zero dependencies.
14
15pub mod types;
16
17pub mod stt;
18pub mod vad;
19
20#[cfg(feature = "openai")]
21pub mod openai_stt;
22
23#[cfg(feature = "silero")]
24pub mod silero;
25
26#[cfg(feature = "realtime")]
27pub mod realtime_stt;
28
29#[cfg(feature = "whisper")]
30pub mod whisper_stt;
31
32#[cfg(feature = "parakeet")]
33pub mod parakeet_stt;
34
35#[cfg(feature = "openai-tts")]
36pub mod tts;
37
38#[cfg(feature = "player")]
39pub mod tts_player;
40
41#[cfg(feature = "mic")]
42pub mod mic;
43
44#[cfg(all(target_os = "macos", feature = "macos-system-audio"))]
45pub mod system_audio;
46
47#[cfg(all(target_os = "macos", feature = "macos-mic-mode"))]
48pub mod mic_mode;
49
50// Re-exports
51#[cfg(feature = "wav")]
52pub use types::read_wav_file;
53pub use types::{AudioChunk, Segment, Speaker, Transcript};
54
55pub use stt::{StreamingSttBackend, SttBackend, SttError, SttInput, SttStreamError};
56pub use vad::{VadBackend, VadConfig, VadEvent};