resources/audio/subresources/voice_consents/index.md +0 −462 deleted
File Deleted View Diff
1# Voice Consents
2
3## List voice consents
4
5**get** `/audio/voice_consents`
6
7Returns a list of voice consent recordings.
8
9### Query Parameters
10
11- `after: optional string`
12
13 A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
14
15- `limit: optional number`
16
17 A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
18
19### Returns
20
21- `data: array of object { id, created_at, language, 2 more }`
22
23 - `id: string`
24
25 The consent recording identifier.
26
27 - `created_at: number`
28
29 The Unix timestamp (in seconds) for when the consent recording was created.
30
31 - `language: string`
32
33 The BCP 47 language tag for the consent phrase (for example, `en-US`).
34
35 - `name: string`
36
37 The label provided when the consent recording was uploaded.
38
39 - `object: "audio.voice_consent"`
40
41 The object type, which is always `audio.voice_consent`.
42
43 - `"audio.voice_consent"`
44
45- `has_more: boolean`
46
47- `object: "list"`
48
49 - `"list"`
50
51- `first_id: optional string`
52
53- `last_id: optional string`
54
55### Example
56
57```http
58curl https://api.openai.com/v1/audio/voice_consents \
59 -H "Authorization: Bearer $OPENAI_API_KEY"
60```
61
62#### Response
63
64```json
65{
66 "data": [
67 {
68 "id": "cons_1234",
69 "created_at": 0,
70 "language": "language",
71 "name": "name",
72 "object": "audio.voice_consent"
73 }
74 ],
75 "has_more": true,
76 "object": "list",
77 "first_id": "first_id",
78 "last_id": "last_id"
79}
80```
81
82### Example
83
84```http
85curl https://api.openai.com/v1/audio/voice_consents?limit=20 \
86 -H "Authorization: Bearer $OPENAI_API_KEY"
87```
88
89## Create voice consent
90
91**post** `/audio/voice_consents`
92
93Upload a voice consent recording.
94
95### Returns
96
97- `id: string`
98
99 The consent recording identifier.
100
101- `created_at: number`
102
103 The Unix timestamp (in seconds) for when the consent recording was created.
104
105- `language: string`
106
107 The BCP 47 language tag for the consent phrase (for example, `en-US`).
108
109- `name: string`
110
111 The label provided when the consent recording was uploaded.
112
113- `object: "audio.voice_consent"`
114
115 The object type, which is always `audio.voice_consent`.
116
117 - `"audio.voice_consent"`
118
119### Example
120
121```http
122curl https://api.openai.com/v1/audio/voice_consents \
123 -H 'Content-Type: multipart/form-data' \
124 -H "Authorization: Bearer $OPENAI_API_KEY" \
125 -F language=language \
126 -F name=name \
127 -F 'recording=@/path/to/recording'
128```
129
130#### Response
131
132```json
133{
134 "id": "cons_1234",
135 "created_at": 0,
136 "language": "language",
137 "name": "name",
138 "object": "audio.voice_consent"
139}
140```
141
142### Example
143
144```http
145curl https://api.openai.com/v1/audio/voice_consents \
146 -X POST \
147 -H "Authorization: Bearer $OPENAI_API_KEY" \
148 -F "name=John Doe" \
149 -F "language=en-US" \
150 -F "recording=@$HOME/consent_recording.wav;type=audio/x-wav"
151```
152
153## Retrieve voice consent
154
155**get** `/audio/voice_consents/{consent_id}`
156
157Retrieves a voice consent recording.
158
159### Path Parameters
160
161- `consent_id: string`
162
163### Returns
164
165- `id: string`
166
167 The consent recording identifier.
168
169- `created_at: number`
170
171 The Unix timestamp (in seconds) for when the consent recording was created.
172
173- `language: string`
174
175 The BCP 47 language tag for the consent phrase (for example, `en-US`).
176
177- `name: string`
178
179 The label provided when the consent recording was uploaded.
180
181- `object: "audio.voice_consent"`
182
183 The object type, which is always `audio.voice_consent`.
184
185 - `"audio.voice_consent"`
186
187### Example
188
189```http
190curl https://api.openai.com/v1/audio/voice_consents/$CONSENT_ID \
191 -H "Authorization: Bearer $OPENAI_API_KEY"
192```
193
194#### Response
195
196```json
197{
198 "id": "cons_1234",
199 "created_at": 0,
200 "language": "language",
201 "name": "name",
202 "object": "audio.voice_consent"
203}
204```
205
206### Example
207
208```http
209curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \
210 -H "Authorization: Bearer $OPENAI_API_KEY"
211```
212
213## Update voice consent
214
215**post** `/audio/voice_consents/{consent_id}`
216
217Updates a voice consent recording (metadata only).
218
219### Path Parameters
220
221- `consent_id: string`
222
223### Body Parameters
224
225- `name: string`
226
227 The updated label for this consent recording.
228
229### Returns
230
231- `id: string`
232
233 The consent recording identifier.
234
235- `created_at: number`
236
237 The Unix timestamp (in seconds) for when the consent recording was created.
238
239- `language: string`
240
241 The BCP 47 language tag for the consent phrase (for example, `en-US`).
242
243- `name: string`
244
245 The label provided when the consent recording was uploaded.
246
247- `object: "audio.voice_consent"`
248
249 The object type, which is always `audio.voice_consent`.
250
251 - `"audio.voice_consent"`
252
253### Example
254
255```http
256curl https://api.openai.com/v1/audio/voice_consents/$CONSENT_ID \
257 -H 'Content-Type: application/json' \
258 -H "Authorization: Bearer $OPENAI_API_KEY" \
259 -d '{
260 "name": "name"
261 }'
262```
263
264#### Response
265
266```json
267{
268 "id": "cons_1234",
269 "created_at": 0,
270 "language": "language",
271 "name": "name",
272 "object": "audio.voice_consent"
273}
274```
275
276### Example
277
278```http
279curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \
280 -X POST \
281 -H "Authorization: Bearer $OPENAI_API_KEY" \
282 -H "Content-Type: application/json" \
283 -d '{
284 "name": "John Doe"
285 }'
286```
287
288## Delete voice consent
289
290**delete** `/audio/voice_consents/{consent_id}`
291
292Deletes a voice consent recording.
293
294### Path Parameters
295
296- `consent_id: string`
297
298### Returns
299
300- `id: string`
301
302 The consent recording identifier.
303
304- `deleted: boolean`
305
306- `object: "audio.voice_consent"`
307
308 - `"audio.voice_consent"`
309
310### Example
311
312```http
313curl https://api.openai.com/v1/audio/voice_consents/$CONSENT_ID \
314 -X DELETE \
315 -H "Authorization: Bearer $OPENAI_API_KEY"
316```
317
318#### Response
319
320```json
321{
322 "id": "cons_1234",
323 "deleted": true,
324 "object": "audio.voice_consent"
325}
326```
327
328### Example
329
330```http
331curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \
332 -X DELETE \
333 -H "Authorization: Bearer $OPENAI_API_KEY"
334```
335
336## Domain Types
337
338### Voice Consent List Response
339
340- `VoiceConsentListResponse object { id, created_at, language, 2 more }`
341
342 A consent recording used to authorize creation of a custom voice.
343
344 - `id: string`
345
346 The consent recording identifier.
347
348 - `created_at: number`
349
350 The Unix timestamp (in seconds) for when the consent recording was created.
351
352 - `language: string`
353
354 The BCP 47 language tag for the consent phrase (for example, `en-US`).
355
356 - `name: string`
357
358 The label provided when the consent recording was uploaded.
359
360 - `object: "audio.voice_consent"`
361
362 The object type, which is always `audio.voice_consent`.
363
364 - `"audio.voice_consent"`
365
366### Voice Consent Create Response
367
368- `VoiceConsentCreateResponse object { id, created_at, language, 2 more }`
369
370 A consent recording used to authorize creation of a custom voice.
371
372 - `id: string`
373
374 The consent recording identifier.
375
376 - `created_at: number`
377
378 The Unix timestamp (in seconds) for when the consent recording was created.
379
380 - `language: string`
381
382 The BCP 47 language tag for the consent phrase (for example, `en-US`).
383
384 - `name: string`
385
386 The label provided when the consent recording was uploaded.
387
388 - `object: "audio.voice_consent"`
389
390 The object type, which is always `audio.voice_consent`.
391
392 - `"audio.voice_consent"`
393
394### Voice Consent Retrieve Response
395
396- `VoiceConsentRetrieveResponse object { id, created_at, language, 2 more }`
397
398 A consent recording used to authorize creation of a custom voice.
399
400 - `id: string`
401
402 The consent recording identifier.
403
404 - `created_at: number`
405
406 The Unix timestamp (in seconds) for when the consent recording was created.
407
408 - `language: string`
409
410 The BCP 47 language tag for the consent phrase (for example, `en-US`).
411
412 - `name: string`
413
414 The label provided when the consent recording was uploaded.
415
416 - `object: "audio.voice_consent"`
417
418 The object type, which is always `audio.voice_consent`.
419
420 - `"audio.voice_consent"`
421
422### Voice Consent Update Response
423
424- `VoiceConsentUpdateResponse object { id, created_at, language, 2 more }`
425
426 A consent recording used to authorize creation of a custom voice.
427
428 - `id: string`
429
430 The consent recording identifier.
431
432 - `created_at: number`
433
434 The Unix timestamp (in seconds) for when the consent recording was created.
435
436 - `language: string`
437
438 The BCP 47 language tag for the consent phrase (for example, `en-US`).
439
440 - `name: string`
441
442 The label provided when the consent recording was uploaded.
443
444 - `object: "audio.voice_consent"`
445
446 The object type, which is always `audio.voice_consent`.
447
448 - `"audio.voice_consent"`
449
450### Voice Consent Delete Response
451
452- `VoiceConsentDeleteResponse object { id, deleted, object }`
453
454 - `id: string`
455
456 The consent recording identifier.
457
458 - `deleted: boolean`
459
460 - `object: "audio.voice_consent"`
461
462 - `"audio.voice_consent"`