1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
//! 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,
}
|