package config import ( "strings" "time" ) // Transcript controls how STT segments are joined into one text field (with embedded newlines). type Transcript struct { PauseGapSec float64 `yaml:"pause_gap_sec"` SpeakerLabel string `yaml:"speaker_label"` } func (t Transcript) WithDefaults() Transcript { if t.PauseGapSec <= 0 { t.PauseGapSec = 1.5 } if strings.TrimSpace(t.SpeakerLabel) == "" { t.SpeakerLabel = "Спикер" } return t } func (t Transcript) PauseGapDuration() time.Duration { return time.Duration(t.PauseGapSec * float64(time.Second)) }