Feat: add extra kokoro tts

This commit is contained in:
Grail Finder
2025-05-17 12:19:30 +03:00
parent 10cca9037f
commit d05d904747
7 changed files with 250 additions and 4 deletions

View File

@@ -7,8 +7,8 @@ import (
)
type Config struct {
EnableCluedo bool `toml:"EnableCluedo"` // Cluedo game mode toggle
CluedoRole2 string `toml:"CluedoRole2"` // Secondary AI role name
EnableCluedo bool `toml:"EnableCluedo"` // Cluedo game mode toggle
CluedoRole2 string `toml:"CluedoRole2"` // Secondary AI role name
ChatAPI string `toml:"ChatAPI"`
CompletionAPI string `toml:"CompletionAPI"`
CurrentAPI string
@@ -39,6 +39,9 @@ type Config struct {
DeepSeekToken string `toml:"DeepSeekToken"`
DeepSeekModel string `toml:"DeepSeekModel"`
ApiLinks []string
// TTS
TTS_URL string `toml:"TTS_URL"`
TTS_ENABLED bool `toml:"TTS_ENABLED"`
}
func LoadConfigOrDefault(fn string) *Config {
@@ -66,6 +69,9 @@ func LoadConfigOrDefault(fn string) *Config {
config.RAGBatchSize = 100
config.RAGWordLimit = 80
config.RAGWorkers = 5
// tts
config.TTS_ENABLED = false
config.TTS_URL = "http://localhost:8880/v1/audio/speech"
}
config.CurrentAPI = config.ChatAPI
config.APIMap = map[string]string{