@@ -3,37 +3,59 @@ package io.cequence.openaiscala.domain.settings
33import io .cequence .wsclient .domain .EnumValue
44
55case class CreateSpeechSettings (
6- // One of the available TTS models: tts-1 or tts-1-hd
6+ // One of the available TTS models: tts-1, tts-1-hd or gpt-4o-mini-tts.
77 model : String ,
88
9- // The voice to use when generating the audio. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
9+ // The voice to use when generating the audio. Supported voices are alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, and verse .
1010 voice : VoiceType ,
1111
12- // The format to audio in. Supported formats are mp3, opus, aac, and flac.
12+ // Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd.
13+ instructions : Option [String ] = None ,
14+
15+ // The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.
1316 // Defaults to mp3.
1417 response_format : Option [SpeechResponseFormatType ] = None ,
1518
1619 // The speed of the generated audio. Select a value from 0.25 to 4.0.
1720 // Defaults to 1.0.
18- speed : Option [Double ] = None
21+ speed : Option [Double ] = None ,
22+
23+ // The format to stream the audio in. Supported formats are sse and audio.
24+ // sse is not supported for tts-1 or tts-1-hd.
25+ // Defaults to audio.
26+ stream_format : Option [StreamFormatType ] = None
1927)
2028
29+ sealed trait StreamFormatType extends EnumValue
30+
31+ object StreamFormatType {
32+ case object sse extends StreamFormatType
33+ case object audio extends StreamFormatType
34+ }
35+
2136sealed trait SpeechResponseFormatType extends EnumValue
2237
2338object SpeechResponseFormatType {
2439 case object mp3 extends SpeechResponseFormatType
2540 case object opus extends SpeechResponseFormatType
2641 case object aac extends SpeechResponseFormatType
2742 case object flac extends SpeechResponseFormatType
43+ case object wav extends SpeechResponseFormatType
44+ case object pcm extends SpeechResponseFormatType
2845}
2946
3047sealed trait VoiceType extends EnumValue
3148
3249object VoiceType {
3350 case object alloy extends VoiceType
51+ case object ash extends VoiceType
52+ case object ballad extends VoiceType
53+ case object coral extends VoiceType
3454 case object echo extends VoiceType
3555 case object fable extends VoiceType
3656 case object onyx extends VoiceType
3757 case object nova extends VoiceType
58+ case object sage extends VoiceType
3859 case object shimmer extends VoiceType
60+ case object verse extends VoiceType
3961}
0 commit comments