fix tts provider and lint
This commit is contained in:
parent
c03ddfe59f
commit
df3bd2515c
1 changed files with 2 additions and 2 deletions
|
|
@ -136,8 +136,8 @@ func (t *OpenAITTSProvider) Synthesize(ctx context.Context, text string) (io.Rea
|
|||
|
||||
func DetectTTS(cfg *config.Config) TTSProvider {
|
||||
for _, mc := range cfg.ModelList {
|
||||
if strings.Contains(strings.ToLower(mc.ModelName), "tts") && mc.APIKey != "" {
|
||||
return NewOpenAITTSProvider(mc.APIKey, mc.APIBase, mc.Proxy)
|
||||
if strings.Contains(strings.ToLower(mc.ModelName), "tts") && mc.APIKey() != "" {
|
||||
return NewOpenAITTSProvider(mc.APIKey(), mc.APIBase, mc.Proxy)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue