Add canary-tts to speech models (#603)
Co-authored-by: Peter Juhasz <juhasz.peter@uhusystems.com>
This commit is contained in:
@@ -11,7 +11,8 @@ 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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user