You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ffdc023
Browse filesBrowse the repository at this point in the historyBrowse files
## Summary
Create custom voices from text descriptions and read their original
prompts.
## Changes
- Add prompt-based voice creation with optional script hints and model
selection.
- Expose the original prompt on voice responses when available.
Co-authored-by: marcuswood-oai <323319819+marcuswood-oai@users.noreply.github.com>
Copy file name to clipboardExpand all lines: api_reference/openapi.transformed.yml
+63-14Lines changed: 63 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1691,11 +1691,11 @@ paths:
1691
1691
- Audio
1692
1692
summary: Create voice
1693
1693
description: |
1694
-
Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.
1694
+
Creates a voice from a text prompt or from a consent recording and an audio sample.
1695
1695
1696
-
Send `name`, `audio_sample`, and the `consent` recording ID as multipart form data. The optional `type` defaults to `audio_sample`.
1696
+
For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as JSON or multipart form data. For creation from an audio sample, send `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID as multipart form data. The type defaults to `audio_sample` when omitted.
1697
1697
1698
-
Returns the saved voice's metadata. See the [custom voices guide](https://developers.openai.com/api/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers.
1698
+
Returns the saved voice's metadata. Voices created from text prompts are supported only in Live, not in Realtime or the speech endpoint. The response does not include preview audio.
1699
1699
requestBody:
1700
1700
required: true
1701
1701
content:
@@ -1710,7 +1710,7 @@ paths:
1710
1710
schema:
1711
1711
$ref: '#/components/schemas/VoiceResource'
1712
1712
'400':
1713
-
description: Invalid voice request, consent recording, or audio sample.
`sage`, `shimmer`, `marin`, and `cedar`. You may also provide a
41532
41536
custom voice object with an `id`, for example `{ "id": "voice_1234" }`.
41533
-
Custom voices must be created from audio samples.
41537
+
Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live.
41534
41538
format:
41535
41539
type: string
41536
41540
enum:
@@ -44371,7 +44375,7 @@ components:
44371
44375
description: Control the voice of your generated audio with additional instructions. Does not work with `tts-1` or `tts-1-hd`.
44372
44376
maxLength: 4096
44373
44377
voice:
44374
-
description: 'The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). Custom voices must be created from audio samples.'
44378
+
description: 'The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the voices are available in the [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live.'
`marin`, and `cedar`. You may also provide a custom voice object with an
54893
54899
`id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
54894
54900
the session once the model has responded with audio at least once.
54895
-
Custom voices must be created from audio samples.
54901
+
Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live.
54896
54902
output_audio_format:
54897
54903
type: string
54898
54904
enum:
@@ -58236,7 +58242,7 @@ components:
58236
58242
`marin`, and `cedar`. You may also provide a custom voice object with
58237
58243
an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed
58238
58244
during the session once the model has responded with audio at least once.
58239
-
Custom voices must be created from audio samples.
58245
+
Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live.
58240
58246
We recommend `marin` and `cedar` for best quality.
58241
58247
tools:
58242
58248
type: array
@@ -60809,7 +60815,7 @@ components:
60809
60815
`marin`, and `cedar`. You may also provide a custom voice object with an
60810
60816
`id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during
60811
60817
the session once the model has responded with audio at least once.
60812
-
Custom voices must be created from audio samples.
60818
+
Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live.
60813
60819
input_audio_format:
60814
60820
type: string
60815
60821
description: |
@@ -61089,7 +61095,7 @@ components:
61089
61095
`marin`, and `cedar`. You may also provide a custom voice object with
61090
61096
an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed
61091
61097
during the session once the model has responded with audio at least once.
61092
-
Custom voices must be created from audio samples.
61098
+
Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live.
61093
61099
We recommend `marin` and `cedar` for best quality.
61094
61100
speed:
61095
61101
type: number
@@ -71723,7 +71729,7 @@ components:
71723
71729
VoiceResource:
71724
71730
type: object
71725
71731
title: Voice
71726
-
description: A custom voice that can be used for audio output.
71732
+
description: A custom voice that can be used for audio output. Voices created from text prompts are supported only in Live.
71727
71733
additionalProperties: false
71728
71734
properties:
71729
71735
object:
@@ -71740,6 +71746,10 @@ components:
71740
71746
type: string
71741
71747
enum:
71742
71748
- audio_sample
71749
+
- prompt
71750
+
prompt:
71751
+
type: string
71752
+
description: The original text prompt used to create the voice. Present for prompt-generated voices with a stored prompt; omitted for audio-sample voices and older voices without a stored prompt.
description: Creates a synthetic voice from a text description. Supports application/json or multipart/form-data.
106349
+
additionalProperties: false
106350
+
properties:
106351
+
type:
106352
+
type: string
106353
+
enum:
106354
+
- prompt
106355
+
description: Set to `prompt` to create a voice from a text description.
106356
+
name:
106357
+
type: string
106358
+
minLength: 1
106359
+
maxLength: 256
106360
+
description: The name of the new voice.
106361
+
prompt:
106362
+
type: string
106363
+
minLength: 1
106364
+
maxLength: 2000
106365
+
description: A description of the desired voice. Must not contain only whitespace.
106366
+
script_hint:
106367
+
type: string
106368
+
minLength: 1
106369
+
maxLength: 2000
106370
+
description: Optional text for the voice to speak during creation. If omitted, a script is generated from the prompt. Must not be blank after trimming whitespace; scripts that are too short are rejected.
106371
+
model:
106372
+
anyOf:
106373
+
- type: string
106374
+
- type: string
106375
+
enum:
106376
+
- auto
106377
+
- 2026-10-08
106378
+
default: auto
106379
+
description: The voice creation model to use. Defaults to `auto`.
0 commit comments