summaryrefslogblamecommitdiff
path: root/makima/src/daemon/cli/server.rs
blob: 667f9eaf1fef864036f6e6e62efbec7990fa4760 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12




                                              






                                                                             





                                                      














                                                                                   
 







                                                   
//! 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<String>,

    /// Path to parakeet EOU model directory (optional).
    #[arg(long, env = "PARAKEET_EOU_DIR")]
    pub parakeet_eou_dir: Option<String>,

    /// Path to sortformer model (optional; diarization disabled when unset).
    #[arg(long, env = "SORTFORMER_MODEL_PATH")]
    pub sortformer_model_path: Option<String>,

    /// Path to Chatterbox TTS model directory (optional; TTS disabled when unset).
    #[arg(long, env = "CHATTERBOX_MODEL_DIR")]
    pub chatterbox_model_dir: Option<String>,

    /// PostgreSQL connection URI
    #[arg(long, env = "POSTGRES_CONNECTION_URI")]
    pub database_url: Option<String>,

    /// Log level (trace, debug, info, warn, error)
    #[arg(short, long, default_value = "info")]
    pub log_level: String,
}