Skip to content

Commit

Permalink
Add canary-tts to speech models (sashabaranov#603)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Juhasz <juhasz.peter@uhusystems.com>
  • Loading branch information
pjuhasz and juhaszp-uhu authored Nov 24, 2023
1 parent a130cfe commit f879095
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions speech.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f879095

Please sign in to comment.