From f87909596f8b0d293142ca00c4d4adc872c52ded Mon Sep 17 00:00:00 2001 From: pjuhasz Date: Fri, 24 Nov 2023 07:34:25 +0000 Subject: [PATCH] Add canary-tts to speech models (#603) Co-authored-by: Peter Juhasz --- speech.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/speech.go b/speech.go index a3d5f5d..f2442b9 100644 --- a/speech.go +++ b/speech.go @@ -10,8 +10,9 @@ import ( type SpeechModel string const ( - TTSModel1 SpeechModel = "tts-1" - TTsModel1HD SpeechModel = "tts-1-hd" + TTSModel1 SpeechModel = "tts-1" + TTSModel1HD SpeechModel = "tts-1-hd" + TTSModelCanary SpeechModel = "canary-tts" ) type SpeechVoice string @@ -57,7 +58,7 @@ func contains[T comparable](s []T, e T) bool { } func isValidSpeechModel(model SpeechModel) bool { - return contains([]SpeechModel{TTSModel1, TTsModel1HD}, model) + return contains([]SpeechModel{TTSModel1, TTSModel1HD, TTSModelCanary}, model) } func isValidVoice(voice SpeechVoice) bool {