Skip to content

Commit c4d5fbd

Browse files
stainless-botStainless Bot
authored andcommitted
feat(api): add new, expressive voices for Realtime and Audio in Chat Completions
chore: unknown commit message
1 parent 3ab123c commit c4d5fbd

File tree

2 files changed

+37
-25
lines changed

2 files changed

+37
-25
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 24
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-b60d5559d5150ecd3b49136064e5e251d832899770ff385b711378389afba370.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-7b0a5d715d94f75ac7795bd4d2175a0e3243af9b935a86c273f371e45583140f.yml

openai-java-core/src/main/kotlin/com/openai/models/ChatCompletionAudioParam.kt

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ private constructor(
3333
private var validated: Boolean = false
3434

3535
/**
36-
* Specifies the voice type. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and
37-
* `shimmer`.
36+
* The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, `coral`,
37+
* `echo`, `sage`, `shimmer`, and `verse`.
3838
*/
3939
fun voice(): Voice = voice.getRequired("voice")
4040

@@ -44,8 +44,8 @@ private constructor(
4444
fun format(): Format = format.getRequired("format")
4545

4646
/**
47-
* Specifies the voice type. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and
48-
* `shimmer`.
47+
* The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, `coral`,
48+
* `echo`, `sage`, `shimmer`, and `verse`.
4949
*/
5050
@JsonProperty("voice") @ExcludeMissing fun _voice() = voice
5151

@@ -87,14 +87,14 @@ private constructor(
8787
}
8888

8989
/**
90-
* Specifies the voice type. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`,
91-
* and `shimmer`.
90+
* The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`,
91+
* `coral`, `echo`, `sage`, `shimmer`, and `verse`.
9292
*/
9393
fun voice(voice: Voice) = voice(JsonField.of(voice))
9494

9595
/**
96-
* Specifies the voice type. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`,
97-
* and `shimmer`.
96+
* The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`,
97+
* `coral`, `echo`, `sage`, `shimmer`, and `verse`.
9898
*/
9999
@JsonProperty("voice")
100100
@ExcludeMissing
@@ -235,57 +235,69 @@ private constructor(
235235

236236
@JvmField val ALLOY = Voice(JsonField.of("alloy"))
237237

238-
@JvmField val ECHO = Voice(JsonField.of("echo"))
238+
@JvmField val ASH = Voice(JsonField.of("ash"))
239+
240+
@JvmField val BALLAD = Voice(JsonField.of("ballad"))
239241

240-
@JvmField val FABLE = Voice(JsonField.of("fable"))
242+
@JvmField val CORAL = Voice(JsonField.of("coral"))
241243

242-
@JvmField val ONYX = Voice(JsonField.of("onyx"))
244+
@JvmField val ECHO = Voice(JsonField.of("echo"))
243245

244-
@JvmField val NOVA = Voice(JsonField.of("nova"))
246+
@JvmField val SAGE = Voice(JsonField.of("sage"))
245247

246248
@JvmField val SHIMMER = Voice(JsonField.of("shimmer"))
247249

250+
@JvmField val VERSE = Voice(JsonField.of("verse"))
251+
248252
@JvmStatic fun of(value: String) = Voice(JsonField.of(value))
249253
}
250254

251255
enum class Known {
252256
ALLOY,
257+
ASH,
258+
BALLAD,
259+
CORAL,
253260
ECHO,
254-
FABLE,
255-
ONYX,
256-
NOVA,
261+
SAGE,
257262
SHIMMER,
263+
VERSE,
258264
}
259265

260266
enum class Value {
261267
ALLOY,
268+
ASH,
269+
BALLAD,
270+
CORAL,
262271
ECHO,
263-
FABLE,
264-
ONYX,
265-
NOVA,
272+
SAGE,
266273
SHIMMER,
274+
VERSE,
267275
_UNKNOWN,
268276
}
269277

270278
fun value(): Value =
271279
when (this) {
272280
ALLOY -> Value.ALLOY
281+
ASH -> Value.ASH
282+
BALLAD -> Value.BALLAD
283+
CORAL -> Value.CORAL
273284
ECHO -> Value.ECHO
274-
FABLE -> Value.FABLE
275-
ONYX -> Value.ONYX
276-
NOVA -> Value.NOVA
285+
SAGE -> Value.SAGE
277286
SHIMMER -> Value.SHIMMER
287+
VERSE -> Value.VERSE
278288
else -> Value._UNKNOWN
279289
}
280290

281291
fun known(): Known =
282292
when (this) {
283293
ALLOY -> Known.ALLOY
294+
ASH -> Known.ASH
295+
BALLAD -> Known.BALLAD
296+
CORAL -> Known.CORAL
284297
ECHO -> Known.ECHO
285-
FABLE -> Known.FABLE
286-
ONYX -> Known.ONYX
287-
NOVA -> Known.NOVA
298+
SAGE -> Known.SAGE
288299
SHIMMER -> Known.SHIMMER
300+
VERSE -> Known.VERSE
289301
else -> throw OpenAIInvalidDataException("Unknown Voice: $value")
290302
}
291303

0 commit comments

Comments
 (0)