resources/audio/subresources/voices/index.md +0 −86 deleted
File Deleted View Diff
1# Voices
2
3## Create voice
4
5**post** `/audio/voices`
6
7Creates a custom voice.
8
9### Returns
10
11- `id: string`
12
13 The voice identifier, which can be referenced in API endpoints.
14
15- `created_at: number`
16
17 The Unix timestamp (in seconds) for when the voice was created.
18
19- `name: string`
20
21 The name of the voice.
22
23- `object: "audio.voice"`
24
25 The object type, which is always `audio.voice`.
26
27 - `"audio.voice"`
28
29### Example
30
31```http
32curl https://api.openai.com/v1/audio/voices \
33 -H 'Content-Type: multipart/form-data' \
34 -H "Authorization: Bearer $OPENAI_API_KEY" \
35 -F 'audio_sample=@/path/to/audio_sample' \
36 -F consent=consent \
37 -F name=name
38```
39
40#### Response
41
42```json
43{
44 "id": "id",
45 "created_at": 0,
46 "name": "name",
47 "object": "audio.voice"
48}
49```
50
51### Example
52
53```http
54curl https://api.openai.com/v1/audio/voices \
55 -X POST \
56 -H "Authorization: Bearer $OPENAI_API_KEY" \
57 -F "name=My new voice" \
58 -F "consent=cons_1234" \
59 -F "audio_sample=@$HOME/audio_sample.wav;type=audio/x-wav"
60```
61
62## Domain Types
63
64### Voice Create Response
65
66- `VoiceCreateResponse object { id, created_at, name, object }`
67
68 A custom voice that can be used for audio output.
69
70 - `id: string`
71
72 The voice identifier, which can be referenced in API endpoints.
73
74 - `created_at: number`
75
76 The Unix timestamp (in seconds) for when the voice was created.
77
78 - `name: string`
79
80 The name of the voice.
81
82 - `object: "audio.voice"`
83
84 The object type, which is always `audio.voice`.
85
86 - `"audio.voice"`