@@ -240,7 +240,12 @@ public enum TtsModel {
240
240
* The latest text to speech model, optimized for quality.
241
241
*/
242
242
@ JsonProperty ("tts-1-hd" )
243
- TTS_1_HD ("tts-1-hd" );
243
+ TTS_1_HD ("tts-1-hd" ),
244
+ /**
245
+ * Text-to-speech model powered by GPT-4o mini
246
+ */
247
+ @ JsonProperty ("gpt-4o-mini-tts" )
248
+ GPT_4_O_MINI_TTS ("gpt-4o-mini-tts" );
244
249
// @formatter:on
245
250
246
251
public final String value ;
@@ -330,14 +335,15 @@ public Class<?> getResponseType() {
330
335
* Speech</a>
331
336
*
332
337
* @param model The model to use for generating the audio. One of the available TTS
333
- * models: tts-1 or tts-1-hd.
338
+ * models: tts-1, tts-1-hd, or gpt-4o-mini-tts .
334
339
* @param input The input text to synthesize. Must be at most 4096 tokens long.
335
340
* @param voice The voice to use for synthesis. One of the available voices for the
336
- * chosen model: 'alloy', 'echo', 'fable', 'onyx', 'nova', and 'shimmer'.
341
+ * chosen model: 'alloy', 'ash', 'ballad', 'coral', 'echo', 'fable', 'onyx', 'nova',
342
+ * 'sage', 'shimmer', and 'verse'.
337
343
* @param responseFormat The format to audio in. Supported formats are mp3, opus, aac,
338
- * and flac . Defaults to mp3.
344
+ * flac, wav, and pcm . Defaults to mp3.
339
345
* @param speed The speed of the voice synthesis. The acceptable range is from 0.25
340
- * (slowest) to 4.0 (fastest).
346
+ * (slowest) to 4.0 (fastest). Does not work with gpt-4o-mini-tts.
341
347
*/
342
348
@ JsonInclude (Include .NON_NULL )
343
349
public record SpeechRequest (
@@ -361,6 +367,8 @@ public enum Voice {
361
367
// @formatter:off
362
368
@ JsonProperty ("alloy" )
363
369
ALLOY ("alloy" ),
370
+ @ JsonProperty ("ballad" )
371
+ BALLAD ("ballad" ),
364
372
@ JsonProperty ("echo" )
365
373
ECHO ("echo" ),
366
374
@ JsonProperty ("fable" )
@@ -376,7 +384,9 @@ public enum Voice {
376
384
@ JsonProperty ("coral" )
377
385
CORAL ("coral" ),
378
386
@ JsonProperty ("ash" )
379
- ASH ("ash" );
387
+ ASH ("ash" ),
388
+ @ JsonProperty ("verse" )
389
+ VERSE ("verse" );
380
390
// @formatter:on
381
391
382
392
public final String value ;
0 commit comments