From 4a581f6c122255bddcb3580539ff24b3c7d7c657 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sun, 9 Nov 2025 11:28:50 +0300 Subject: Chore: stt reworks [WIP] --- config/config.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'config/config.go') diff --git a/config/config.go b/config/config.go index d73bf28..77873e8 100644 --- a/config/config.go +++ b/config/config.go @@ -56,9 +56,14 @@ type Config struct { TTS_ENABLED bool `toml:"TTS_ENABLED"` TTS_SPEED float32 `toml:"TTS_SPEED"` // STT - STT_URL string `toml:"STT_URL"` - STT_ENABLED bool `toml:"STT_ENABLED"` - DBPATH string `toml:"DBPATH"` + STT_TYPE string `toml:"STT_TYPE"` // WHISPER_SERVER, WHISPER_BINARY + STT_URL string `toml:"STT_URL"` + STT_SR int `toml:"STT_SR"` + STT_ENABLED bool `toml:"STT_ENABLED"` + WhisperBinaryPath string `toml:"WhisperBinaryPath"` + WhisperModelPath string `toml:"WhisperModelPath"` + STT_LANG string `toml:"STT_LANG"` + DBPATH string `toml:"DBPATH"` } func LoadConfigOrDefault(fn string) *Config { @@ -93,6 +98,7 @@ func LoadConfigOrDefault(fn string) *Config { config.TTS_ENABLED = false config.TTS_URL = "http://localhost:8880/v1/audio/speech" config.FetchModelNameAPI = "http://localhost:8080/v1/models" + config.STT_SR = 16000 } config.CurrentAPI = config.ChatAPI config.APIMap = map[string]string{ -- cgit v1.2.3