Skip to content

Commit 28130c7

Browse files
stainless-app[bot]RobertCraigie
authored andcommitted
chore(api): updates to supported Voice IDs
1 parent 38c9d54 commit 28130c7

File tree

11 files changed

+143
-37
lines changed

11 files changed

+143
-37
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 82
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-5ad6884898c07591750dde560118baf7074a59aecd1f367f930c5e42b04e848a.yml
3-
openapi_spec_hash: 0c255269b89767eae26f4d4dc22d3cbd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6663c59193eb95b201e492de17dcbd5e126ba03d18ce66287a3e2c632ca56fe7.yml
3+
openapi_spec_hash: 7996d2c34cc44fe2ce9ffe93c0ab774e
44
config_hash: d36e491b0afc4f79e3afad4b3c9bec70

src/resources/audio/speech.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,23 @@ export interface SpeechCreateParams {
3535

3636
/**
3737
* The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
38-
* `coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the
39-
* voices are available in the
38+
* `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
39+
* `verse`. Previews of the voices are available in the
4040
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
4141
*/
42-
voice: 'alloy' | 'ash' | 'coral' | 'echo' | 'fable' | 'onyx' | 'nova' | 'sage' | 'shimmer';
42+
voice:
43+
| (string & {})
44+
| 'alloy'
45+
| 'ash'
46+
| 'ballad'
47+
| 'coral'
48+
| 'echo'
49+
| 'fable'
50+
| 'onyx'
51+
| 'nova'
52+
| 'sage'
53+
| 'shimmer'
54+
| 'verse';
4355

4456
/**
4557
* Control the voice of your generated audio with additional instructions. Does not

src/resources/beta/realtime/realtime.ts

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,9 +1005,22 @@ export interface RealtimeResponse {
10051005

10061006
/**
10071007
* The voice the model used to respond. Current voice options are `alloy`, `ash`,
1008-
* `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
1009-
*/
1010-
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
1008+
* `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
1009+
* `verse`.
1010+
*/
1011+
voice?:
1012+
| (string & {})
1013+
| 'alloy'
1014+
| 'ash'
1015+
| 'ballad'
1016+
| 'coral'
1017+
| 'echo'
1018+
| 'fable'
1019+
| 'onyx'
1020+
| 'nova'
1021+
| 'sage'
1022+
| 'shimmer'
1023+
| 'verse';
10111024
}
10121025

10131026
/**
@@ -1620,9 +1633,22 @@ export namespace ResponseCreateEvent {
16201633
/**
16211634
* The voice the model uses to respond. Voice cannot be changed during the session
16221635
* once the model has responded with audio at least once. Current voice options are
1623-
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
1624-
*/
1625-
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
1636+
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
1637+
* `shimmer`, and `verse`.
1638+
*/
1639+
voice?:
1640+
| (string & {})
1641+
| 'alloy'
1642+
| 'ash'
1643+
| 'ballad'
1644+
| 'coral'
1645+
| 'echo'
1646+
| 'fable'
1647+
| 'onyx'
1648+
| 'nova'
1649+
| 'sage'
1650+
| 'shimmer'
1651+
| 'verse';
16261652
}
16271653

16281654
export namespace Response {
@@ -2078,9 +2104,22 @@ export namespace SessionUpdateEvent {
20782104
/**
20792105
* The voice the model uses to respond. Voice cannot be changed during the session
20802106
* once the model has responded with audio at least once. Current voice options are
2081-
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
2082-
*/
2083-
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
2107+
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
2108+
* `shimmer`, and `verse`.
2109+
*/
2110+
voice?:
2111+
| (string & {})
2112+
| 'alloy'
2113+
| 'ash'
2114+
| 'ballad'
2115+
| 'coral'
2116+
| 'echo'
2117+
| 'fable'
2118+
| 'onyx'
2119+
| 'nova'
2120+
| 'sage'
2121+
| 'shimmer'
2122+
| 'verse';
20842123
}
20852124

20862125
export namespace Session {
@@ -2376,7 +2415,7 @@ export namespace TranscriptionSessionUpdate {
23762415
export interface TurnDetection {
23772416
/**
23782417
* Whether or not to automatically generate a response when a VAD stop event
2379-
* occurs.
2418+
* occurs. Not available for transcription sessions.
23802419
*/
23812420
create_response?: boolean;
23822421

@@ -2390,7 +2429,7 @@ export namespace TranscriptionSessionUpdate {
23902429
/**
23912430
* Whether or not to automatically interrupt any ongoing response with output to
23922431
* the default conversation (i.e. `conversation` of `auto`) when a VAD start event
2393-
* occurs.
2432+
* occurs. Not available for transcription sessions.
23942433
*/
23952434
interrupt_response?: boolean;
23962435

src/resources/beta/realtime/sessions.ts

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,19 @@ export interface Session {
141141
* once the model has responded with audio at least once. Current voice options are
142142
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
143143
*/
144-
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
144+
voice?:
145+
| (string & {})
146+
| 'alloy'
147+
| 'ash'
148+
| 'ballad'
149+
| 'coral'
150+
| 'echo'
151+
| 'fable'
152+
| 'onyx'
153+
| 'nova'
154+
| 'sage'
155+
| 'shimmer'
156+
| 'verse';
145157
}
146158

147159
export namespace Session {
@@ -363,7 +375,19 @@ export interface SessionCreateResponse {
363375
* once the model has responded with audio at least once. Current voice options are
364376
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
365377
*/
366-
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
378+
voice?:
379+
| (string & {})
380+
| 'alloy'
381+
| 'ash'
382+
| 'ballad'
383+
| 'coral'
384+
| 'echo'
385+
| 'fable'
386+
| 'onyx'
387+
| 'nova'
388+
| 'sage'
389+
| 'shimmer'
390+
| 'verse';
367391
}
368392

369393
export namespace SessionCreateResponse {
@@ -563,9 +587,22 @@ export interface SessionCreateParams {
563587
/**
564588
* The voice the model uses to respond. Voice cannot be changed during the session
565589
* once the model has responded with audio at least once. Current voice options are
566-
* `alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
567-
*/
568-
voice?: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
590+
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
591+
* `shimmer`, and `verse`.
592+
*/
593+
voice?:
594+
| (string & {})
595+
| 'alloy'
596+
| 'ash'
597+
| 'ballad'
598+
| 'coral'
599+
| 'echo'
600+
| 'fable'
601+
| 'onyx'
602+
| 'nova'
603+
| 'sage'
604+
| 'shimmer'
605+
| 'verse';
569606
}
570607

571608
export namespace SessionCreateParams {

src/resources/beta/realtime/transcription-sessions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export namespace TranscriptionSessionCreateParams {
254254
export interface TurnDetection {
255255
/**
256256
* Whether or not to automatically generate a response when a VAD stop event
257-
* occurs.
257+
* occurs. Not available for transcription sessions.
258258
*/
259259
create_response?: boolean;
260260

@@ -268,7 +268,7 @@ export namespace TranscriptionSessionCreateParams {
268268
/**
269269
* Whether or not to automatically interrupt any ongoing response with output to
270270
* the default conversation (i.e. `conversation` of `auto`) when a VAD start event
271-
* occurs.
271+
* occurs. Not available for transcription sessions.
272272
*/
273273
interrupt_response?: boolean;
274274

src/resources/chat/completions/completions.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,19 @@ export interface ChatCompletionAudioParam {
314314
* The voice the model uses to respond. Supported voices are `alloy`, `ash`,
315315
* `ballad`, `coral`, `echo`, `sage`, and `shimmer`.
316316
*/
317-
voice: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
317+
voice:
318+
| (string & {})
319+
| 'alloy'
320+
| 'ash'
321+
| 'ballad'
322+
| 'coral'
323+
| 'echo'
324+
| 'fable'
325+
| 'onyx'
326+
| 'nova'
327+
| 'sage'
328+
| 'shimmer'
329+
| 'verse';
318330
}
319331

320332
/**

src/resources/responses/input-items.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ export interface InputItemListParams extends CursorPageParams {
6060
*/
6161
before?: string;
6262

63+
/**
64+
* Additional fields to include in the response. See the `include` parameter for
65+
* Response creation above for more information.
66+
*/
67+
include?: Array<ResponsesAPI.ResponseIncludable>;
68+
6369
/**
6470
* The order to return the input items in. Default is `asc`.
6571
*

src/resources/responses/responses.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ export interface Response {
233233
* context.
234234
*
235235
* When using along with `previous_response_id`, the instructions from a previous
236-
* response will be not be carried over to the next response. This makes it simple
237-
* to swap out system (or developer) messages in new responses.
236+
* response will not be carried over to the next response. This makes it simple to
237+
* swap out system (or developer) messages in new responses.
238238
*/
239239
instructions: string | null;
240240

@@ -1284,6 +1284,12 @@ export type ResponseFormatTextConfig =
12841284
* [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
12851285
*/
12861286
export interface ResponseFormatTextJSONSchemaConfig {
1287+
/**
1288+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores
1289+
* and dashes, with a maximum length of 64.
1290+
*/
1291+
name: string;
1292+
12871293
/**
12881294
* The schema for the response format, described as a JSON Schema object. Learn how
12891295
* to build JSON schemas [here](https://json-schema.org/).
@@ -1301,12 +1307,6 @@ export interface ResponseFormatTextJSONSchemaConfig {
13011307
*/
13021308
description?: string;
13031309

1304-
/**
1305-
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores
1306-
* and dashes, with a maximum length of 64.
1307-
*/
1308-
name?: string;
1309-
13101310
/**
13111311
* Whether to enable strict schema adherence when generating the output. If set to
13121312
* true, the model will always follow the exact schema defined in the `schema`
@@ -2626,8 +2626,8 @@ export interface ResponseCreateParamsBase {
26262626
* context.
26272627
*
26282628
* When using along with `previous_response_id`, the instructions from a previous
2629-
* response will be not be carried over to the next response. This makes it simple
2630-
* to swap out system (or developer) messages in new responses.
2629+
* response will not be carried over to the next response. This makes it simple to
2630+
* swap out system (or developer) messages in new responses.
26312631
*/
26322632
instructions?: string | null;
26332633

tests/api-resources/audio/speech.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('resource speech', () => {
1313
const response = await client.audio.speech.create({
1414
input: 'input',
1515
model: 'string',
16-
voice: 'alloy',
16+
voice: 'ash',
1717
instructions: 'instructions',
1818
response_format: 'mp3',
1919
speed: 0.25,

tests/api-resources/chat/completions/completions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('resource completions', () => {
2626
const response = await client.chat.completions.create({
2727
messages: [{ content: 'string', role: 'developer', name: 'name' }],
2828
model: 'gpt-4o',
29-
audio: { format: 'wav', voice: 'alloy' },
29+
audio: { format: 'wav', voice: 'ash' },
3030
frequency_penalty: -2,
3131
function_call: 'none',
3232
functions: [{ name: 'name', description: 'description', parameters: { foo: 'bar' } }],

0 commit comments

Comments
 (0)