//! Server subcommand - run the makima server. use clap::Args; /// Run the makima server. /// /// ML model paths (parakeet / sortformer / chatterbox) are optional. When /// none are provided the server still starts; the Listen and Speak websocket /// endpoints just return a "not configured" error if a client tries to use /// them. This is the supported way to run a slim deployment of makima /// without the LLM/STT/TTS dependencies — see `Dockerfile` (slim) vs /// `Dockerfile.full` (with models). #[derive(Args, Debug)] pub struct ServerArgs { /// Server port #[arg(long, env = "PORT", default_value = "8080")] pub port: u16, /// Path to parakeet model directory (optional; STT disabled when unset). #[arg(long, env = "PARAKEET_MODEL_DIR")] pub parakeet_model_dir: Option, /// Path to parakeet EOU model directory (optional). #[arg(long, env = "PARAKEET_EOU_DIR")] pub parakeet_eou_dir: Option, /// Path to sortformer model (optional; diarization disabled when unset). #[arg(long, env = "SORTFORMER_MODEL_PATH")] pub sortformer_model_path: Option, /// Path to Chatterbox TTS model directory (optional; TTS disabled when unset). #[arg(long, env = "CHATTERBOX_MODEL_DIR")] pub chatterbox_model_dir: Option, /// PostgreSQL connection URI #[arg(long, env = "POSTGRES_CONNECTION_URI")] pub database_url: Option, /// Log level (trace, debug, info, warn, error) #[arg(short, long, default_value = "info")] pub log_level: String, }