Add canary-tts to speech models (#603)

Co-authored-by: Peter Juhasz <juhasz.peter@uhusystems.com>
This commit is contained in:
pjuhasz
2023-11-24 11:34:25 +04:00
committed by GitHub
co-authored by Peter Juhasz
parent a130cfee26
commit f87909596f
+4 -3
View File
@@ -10,8 +10,9 @@ import (
type SpeechModel string type SpeechModel string
const ( const (
TTSModel1 SpeechModel = "tts-1" TTSModel1 SpeechModel = "tts-1"
TTsModel1HD SpeechModel = "tts-1-hd" TTSModel1HD SpeechModel = "tts-1-hd"
TTSModelCanary SpeechModel = "canary-tts"
) )
type SpeechVoice string type SpeechVoice string
@@ -57,7 +58,7 @@ func contains[T comparable](s []T, e T) bool {
} }
func isValidSpeechModel(model SpeechModel) bool { func isValidSpeechModel(model SpeechModel) bool {
return contains([]SpeechModel{TTSModel1, TTsModel1HD}, model) return contains([]SpeechModel{TTSModel1, TTSModel1HD, TTSModelCanary}, model)
} }
func isValidVoice(voice SpeechVoice) bool { func isValidVoice(voice SpeechVoice) bool {