//! # LiveSpeech SDK
//!
//! A Rust SDK for real-time speech-to-speech AI conversations.
//!
//! ## Features
//!
//! - **Real-time Speech-to-Text**: Powered by Google Gemini STT with streaming transcription
//! - **AI Responses**: AWS Bedrock LLM integration with streaming text generation
//! - **Text-to-Speech**: Google Cloud TTS for natural voice output
//! - **WebSocket Streaming**: Low-latency bidirectional communication
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use livespeech_sdk::{LiveSpeechClient, Config, Region, SessionConfig};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     // Create configuration
//!     let config = Config::builder()
//!         .region(Region::ApNortheast2)
//!         .api_key("your-api-key")
//!         .build()?;
//!
//!     // Create client
//!     let client = LiveSpeechClient::new(config);
//!
//!     // Set up event handlers
//!     client.on_transcript(|text, is_final| {
//!         println!("Transcript: {} (final: {})", text, is_final);
//!     }).await;
//!
//!     client.on_response(|text, is_final| {
//!         println!("Response: {} (final: {})", text, is_final);
//!     }).await;
//!
//!     client.on_audio(|data| {
//!         println!("Received {} bytes of audio", data.len());
//!     }).await;
//!
//!     // Connect
//!     client.connect().await?;
//!
//!     // Start session
//!     let session_config = SessionConfig::new("You are a helpful assistant.");
//!     let session_id = client.start_session(Some(session_config)).await?;
//!     println!("Session started: {}", session_id);
//!
//!     // Start audio streaming
//!     client.audio_start().await?;
//!
//!     // Send audio chunks (example)
//!     let audio_chunk: Vec<u8> = vec![0u8; 3200]; // PCM16 audio data
//!     client.send_audio_chunk(&audio_chunk).await?;
//!
//!     // End audio streaming
//!     client.audio_end().await?;
//!
//!     // End session
//!     client.end_session().await?;
//!
//!     // Disconnect
//!     client.disconnect().await;
//!
//!     Ok(())
//! }
//! ```

pub mod audio;
pub mod client;
pub mod error;
pub mod types;

// Re-export main types for convenience
pub use client::{ConnectionState, LiveSpeechClient};
pub use error::{LiveSpeechError, Result};
pub use types::{
    // Config types
    Config, ConfigBuilder, ConfigError, PipelineMode, Region, SessionConfig,
    // Event types
    AudioEvent, AudioHandler, ConnectedEvent, DisconnectedEvent, DisconnectReason, ErrorCode,
    ErrorEvent, ErrorHandler, LiveSpeechEvent, ReadyEvent, ReconnectingEvent, ResponseEvent,
    ResponseHandler, SessionEndedEvent, SessionStartedEvent, TurnCompleteEvent,
    UserTranscriptEvent, UserTranscriptHandler,
    // Message types
    ClientMessage, ServerMessage,
};

// Re-export audio utilities
pub use audio::{
    bytes_to_int16, create_wav_header, decode_from_base64, encode_to_base64, float32_to_int16,
    int16_to_bytes, int16_to_float32, wrap_pcm_in_wav, AudioEncoder,
};
