X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/7cc0014244124aea59672904de65a979a8e5fb2c..5dbb2e42e88e78bfc79b473b5b1dc466d8dbbf62:/config.go diff --git a/config.go b/config.go index 6e2da84..1d68b67 100644 --- a/config.go +++ b/config.go @@ -35,6 +35,7 @@ func loadConfig(dir string) (Config, error) { decoder := json.NewDecoder(bytes.NewReader(data)) decoder.DisallowUnknownFields() + err = decoder.Decode(&config) if err == nil && !errors.Is(decoder.Decode(&struct{}{}), io.EOF) { err = errors.New("data after the JSON object") @@ -54,6 +55,7 @@ func loadConfig(dir string) (Config, error) { // Config holds the settings of config.json in the data directory. type Config struct { Endpoint string `json:"endpoint"` + Voice VoiceConfig `json:"voice"` Compactor ModelConfig `json:"compactor"` }