atomr_agents_tts_voice/lib.rs
1//! `Conversation` — bidirectional voice session built on top of the
2//! [`atomr_agents_stt_core::SpeechToText`] and
3//! [`atomr_agents_tts_core::TextToSpeech`] traits.
4//!
5//! Two operating modes:
6//!
7//! - [`ConversationMode::TurnBased`] — run STT on caller-supplied
8//! PCM, hand the transcript to the user-supplied
9//! [`ConversationAgent`], synthesise the reply via TTS. Works with
10//! any STT + TTS pair.
11//! - [`ConversationMode::UnifiedRealtime`] — open one
12//! [`atomr_agents_tts_core::RealtimeSession`] (e.g. OpenAI Realtime,
13//! Gemini Live, ElevenLabs Conversational AI) that both transcribes
14//! inbound audio and emits assistant audio. The agent is consulted
15//! only if the backend surfaces an [`InboundTranscript`] event and
16//! the conversation is configured for client-side responses.
17//!
18//! This crate intentionally has no platform deps: mic capture and
19//! speaker playback live in `atomr-agents-stt-audio` and
20//! `atomr-agents-tts-audio` respectively. Consumers wire those up
21//! around `Conversation`.
22
23mod conversation;
24
25pub use conversation::{
26 Conversation, ConversationAgent, ConversationEvent, ConversationMode, ConversationOptions, NoopAgent,
27};