openai 0.101.0 → 0.101.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c9c92914efc09920f412b87f40bd0401a68b41f69fa4ffcaee090cf8ee93959
4
- data.tar.gz: af39812b8849fa3bdb1f0f04dd5da8368c45b244ec24c52cfe901e5e22445690
3
+ metadata.gz: 76f7d390fded7c11700ad3bd5449bce21cac262612deaedc06c5c2df965fa5e2
4
+ data.tar.gz: e29844fdeeb065f5ccce08487880a1ff5b1b89fe08c5a29fe2b5c9ab2cba6ddf
5
5
  SHA512:
6
- metadata.gz: 49f421e6b6fca640e3abbee1028b7df1935c9cc7c79ddecebc6fb50b01e920ca5fc0cbed0b652cc065730b5e6696f0de18367d51e0f4fa0ceec8caee92ccdcf5
7
- data.tar.gz: ae6558f4994712ecb02afe85d5961c26657bc48001ad4c8dde460f408b256434cf741a71f60bb17432e3c35d2dca4180d81a8b77ceafdc6831a8117ff7971116
6
+ metadata.gz: b5c9ea9bfb85686d4ff3d061e88dd5bbb80bcfdb4789d87d93e5e21fe3dd0b429aa9cb3cc7ca537f8b9f93f9580ba2c9147105269c767ff37a3166605db23c33
7
+ data.tar.gz: 86de051adcf41d15877a3c20cf4c8592f01b44ae4ab95a318dce426493a76cfa9fc13ca5f2b74c02fbf051b3c36781e09f65f60f9b02de41d7e5af9e22cd779b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.101.1](https://github.com/openai/openai-ruby/compare/v0.101.0...v0.101.1) (2026-10-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **api:** correct custom voice creation parameters ([#814](https://github.com/openai/openai-ruby/issues/814)) ([8e6daec](https://github.com/openai/openai-ruby/commit/8e6daecffadccb2f2cd5f442daa63cf4e2b73340))
9
+
3
10
  ## [0.101.0](https://github.com/openai/openai-ruby/compare/v0.100.0...v0.101.0) (2026-10-06)
4
11
 
5
12
 
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.101.0"
18
+ gem "openai", "~> 0.101.1"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -29,8 +29,7 @@ module OpenAI
29
29
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
30
30
  # voices are available in the
31
31
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
32
- # Custom voices must be created from audio samples. Voices created from text
33
- # prompts are supported only in Live.
32
+ # Custom voices must be created from audio samples.
34
33
  #
35
34
  # @return [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice]
36
35
  required :voice, union: -> { OpenAI::Audio::SpeechCreateParams::Voice }
@@ -79,8 +78,7 @@ module OpenAI
79
78
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
80
79
  # voices are available in the
81
80
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
82
- # Custom voices must be created from audio samples. Voices created from text
83
- # prompts are supported only in Live.
81
+ # Custom voices must be created from audio samples.
84
82
  #
85
83
  # @param instructions [String]
86
84
  # Control the voice of your generated audio with additional instructions. Does not
@@ -121,8 +119,7 @@ module OpenAI
121
119
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
122
120
  # voices are available in the
123
121
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
124
- # Custom voices must be created from audio samples. Voices created from text
125
- # prompts are supported only in Live.
122
+ # Custom voices must be created from audio samples.
126
123
  module Voice
127
124
  extend OpenAI::Internal::Type::Union
128
125
 
@@ -30,15 +30,13 @@ module OpenAI
30
30
  required :object, const: :"audio.voice"
31
31
 
32
32
  # @!attribute type
33
- # How the voice was created. Voices created from text prompts are supported only
34
- # in Live.
33
+ # How the voice was created.
35
34
  #
36
35
  # @return [Symbol, OpenAI::Models::Audio::Voice::Type]
37
36
  required :type, enum: -> { OpenAI::Audio::Voice::Type }
38
37
 
39
38
  # @!method initialize(id:, created_at:, name:, type:, object: :"audio.voice")
40
- # A custom voice that can be used for audio output. Voices created from text
41
- # prompts are supported only in Live.
39
+ # A custom voice that can be used for audio output.
42
40
  #
43
41
  # @param id [String]
44
42
  # The voice identifier, which can be referenced in API endpoints.
@@ -50,21 +48,18 @@ module OpenAI
50
48
  # The name of the voice.
51
49
  #
52
50
  # @param type [Symbol, OpenAI::Models::Audio::Voice::Type]
53
- # How the voice was created. Voices created from text prompts are supported only
54
- # in Live.
51
+ # How the voice was created.
55
52
  #
56
53
  # @param object [Symbol, :"audio.voice"]
57
54
  # The object type, which is always `audio.voice`.
58
55
 
59
- # How the voice was created. Voices created from text prompts are supported only
60
- # in Live.
56
+ # How the voice was created.
61
57
  #
62
58
  # @see OpenAI::Models::Audio::Voice#type
63
59
  module Type
64
60
  extend OpenAI::Internal::Type::Enum
65
61
 
66
62
  AUDIO_SAMPLE = :audio_sample
67
- PROMPT = :prompt
68
63
 
69
64
  # @!method self.values
70
65
  # @return [Array<Symbol>]
@@ -12,11 +12,11 @@ module OpenAI
12
12
  # Creates a voice from a consent recording and an audio sample. Requires
13
13
  # multipart/form-data.
14
14
  #
15
- # @return [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt]
15
+ # @return [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample]
16
16
  required :body, union: -> { OpenAI::Audio::VoiceCreateParams::Body }
17
17
 
18
18
  # @!method initialize(body:, request_options: {})
19
- # @param body [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt]
19
+ # @param body [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample]
20
20
  # Creates a voice from a consent recording and an audio sample. Requires
21
21
  # multipart/form-data.
22
22
  #
@@ -43,9 +43,6 @@ module OpenAI
43
43
  # Creates a voice from a consent recording and an audio sample. Requires multipart/form-data.
44
44
  variant :audio_sample, -> { OpenAI::Audio::VoiceCreateParams::Body::AudioSample }
45
45
 
46
- # Creates a synthetic voice from a text description. Supports application/json or multipart/form-data.
47
- variant :prompt, -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt }
48
-
49
46
  class AudioSample < OpenAI::Internal::Type::BaseModel
50
47
  # @!attribute audio_sample
51
48
  # The sample audio recording file. Maximum size is 10 MiB.
@@ -114,102 +111,8 @@ module OpenAI
114
111
  end
115
112
  end
116
113
 
117
- class Prompt < OpenAI::Internal::Type::BaseModel
118
- # @!attribute name
119
- # The name of the new voice.
120
- #
121
- # @return [String]
122
- required :name, String
123
-
124
- # @!attribute prompt
125
- # A description of the desired voice. Must not contain only whitespace.
126
- #
127
- # @return [String]
128
- required :prompt, String
129
-
130
- # @!attribute type
131
- # Set to `prompt` to create a voice from a text description.
132
- #
133
- # @return [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Type]
134
- required :type, enum: -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type }
135
-
136
- # @!attribute model
137
- # The voice creation model to use. Defaults to `auto`.
138
- #
139
- # @return [String, Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model, nil]
140
- optional :model, union: -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model }
141
-
142
- # @!attribute script_hint
143
- # Optional text for the voice to speak during creation. If omitted, a script is
144
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
145
- # that are too short are rejected.
146
- #
147
- # @return [String, nil]
148
- optional :script_hint, String
149
-
150
- # @!method initialize(name:, prompt:, type:, model: nil, script_hint: nil)
151
- # Creates a synthetic voice from a text description. Supports application/json or
152
- # multipart/form-data.
153
- #
154
- # @param name [String]
155
- # The name of the new voice.
156
- #
157
- # @param prompt [String]
158
- # A description of the desired voice. Must not contain only whitespace.
159
- #
160
- # @param type [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Type]
161
- # Set to `prompt` to create a voice from a text description.
162
- #
163
- # @param model [String, Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model]
164
- # The voice creation model to use. Defaults to `auto`.
165
- #
166
- # @param script_hint [String]
167
- # Optional text for the voice to speak during creation. If omitted, a script is
168
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
169
- # that are too short are rejected.
170
-
171
- # Set to `prompt` to create a voice from a text description.
172
- #
173
- # @see OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt#type
174
- module Type
175
- extend OpenAI::Internal::Type::Enum
176
-
177
- PROMPT = :prompt
178
-
179
- # @!method self.values
180
- # @return [Array<Symbol>]
181
- end
182
-
183
- # The voice creation model to use. Defaults to `auto`.
184
- #
185
- # @see OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt#model
186
- module Model
187
- extend OpenAI::Internal::Type::Union
188
-
189
- variant String
190
-
191
- variant const: -> { OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model::AUTO }
192
-
193
- variant const: -> { OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model::MODEL_2026_10_01 }
194
-
195
- # @!method self.variants
196
- # @return [Array(String, Symbol)]
197
-
198
- define_sorbet_constant!(:Variants) do
199
- T.type_alias { T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol) }
200
- end
201
-
202
- # @!group
203
-
204
- AUTO = :auto
205
- MODEL_2026_10_01 = :"2026-10-01"
206
-
207
- # @!endgroup
208
- end
209
- end
210
-
211
114
  # @!method self.variants
212
- # @return [Array(OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt)]
115
+ # @return [Array(OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample)]
213
116
  end
214
117
  end
215
118
  end
@@ -16,7 +16,7 @@ module OpenAI
16
16
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
17
17
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
18
18
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
19
- # samples. Voices created from text prompts are supported only in Live.
19
+ # samples.
20
20
  #
21
21
  # @return [String, Symbol, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice::ID, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice]
22
22
  required :voice, union: -> { OpenAI::Chat::ChatCompletionAudioParam::Voice }
@@ -35,7 +35,7 @@ module OpenAI
35
35
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
36
36
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
37
37
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
38
- # samples. Voices created from text prompts are supported only in Live.
38
+ # samples.
39
39
 
40
40
  # Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`,
41
41
  # or `pcm16`.
@@ -59,7 +59,7 @@ module OpenAI
59
59
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
60
60
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
61
61
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
62
- # samples. Voices created from text prompts are supported only in Live.
62
+ # samples.
63
63
  #
64
64
  # @see OpenAI::Models::Chat::ChatCompletionAudioParam#voice
65
65
  module Voice
@@ -28,8 +28,7 @@ module OpenAI
28
28
  # `cedar`. You may also provide a custom voice object with an `id`, for example
29
29
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
30
30
  # model has responded with audio at least once. Custom voices must be created from
31
- # audio samples. Voices created from text prompts are supported only in Live. We
32
- # recommend `marin` and `cedar` for best quality.
31
+ # audio samples. We recommend `marin` and `cedar` for best quality.
33
32
  #
34
33
  # @return [String, Symbol, OpenAI::Models::Realtime::RealtimeAudioConfigOutput::Voice::ID, OpenAI::Models::Realtime::RealtimeAudioConfigOutput::Voice, nil]
35
34
  optional :voice, union: -> { OpenAI::Realtime::RealtimeAudioConfigOutput::Voice }
@@ -53,16 +52,14 @@ module OpenAI
53
52
  # `cedar`. You may also provide a custom voice object with an `id`, for example
54
53
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
55
54
  # model has responded with audio at least once. Custom voices must be created from
56
- # audio samples. Voices created from text prompts are supported only in Live. We
57
- # recommend `marin` and `cedar` for best quality.
55
+ # audio samples. We recommend `marin` and `cedar` for best quality.
58
56
 
59
57
  # The voice the model uses to respond. Supported built-in voices are `alloy`,
60
58
  # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
61
59
  # `cedar`. You may also provide a custom voice object with an `id`, for example
62
60
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
63
61
  # model has responded with audio at least once. Custom voices must be created from
64
- # audio samples. Voices created from text prompts are supported only in Live. We
65
- # recommend `marin` and `cedar` for best quality.
62
+ # audio samples. We recommend `marin` and `cedar` for best quality.
66
63
  #
67
64
  # @see OpenAI::Models::Realtime::RealtimeAudioConfigOutput#voice
68
65
  module Voice
@@ -28,8 +28,7 @@ module OpenAI
28
28
  # `cedar`. You may also provide a custom voice object with an `id`, for example
29
29
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
30
30
  # model has responded with audio at least once. Custom voices must be created from
31
- # audio samples. Voices created from text prompts are supported only in Live. We
32
- # recommend `marin` and `cedar` for best quality.
31
+ # audio samples. We recommend `marin` and `cedar` for best quality.
33
32
  #
34
33
  # @return [String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ID, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice, nil]
35
34
  optional :voice, union: -> { OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice }
@@ -44,16 +43,14 @@ module OpenAI
44
43
  # `cedar`. You may also provide a custom voice object with an `id`, for example
45
44
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
46
45
  # model has responded with audio at least once. Custom voices must be created from
47
- # audio samples. Voices created from text prompts are supported only in Live. We
48
- # recommend `marin` and `cedar` for best quality.
46
+ # audio samples. We recommend `marin` and `cedar` for best quality.
49
47
 
50
48
  # The voice the model uses to respond. Supported built-in voices are `alloy`,
51
49
  # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
52
50
  # `cedar`. You may also provide a custom voice object with an `id`, for example
53
51
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
54
52
  # model has responded with audio at least once. Custom voices must be created from
55
- # audio samples. Voices created from text prompts are supported only in Live. We
56
- # recommend `marin` and `cedar` for best quality.
53
+ # audio samples. We recommend `marin` and `cedar` for best quality.
57
54
  #
58
55
  # @see OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output#voice
59
56
  module Voice
@@ -26,8 +26,7 @@ module OpenAI
26
26
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
27
27
  # voices are available in the
28
28
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
29
- # Custom voices must be created from audio samples. Voices created from text
30
- # prompts are supported only in Live.
29
+ # Custom voices must be created from audio samples.
31
30
  #
32
31
  # @param instructions [String]
33
32
  # Control the voice of your generated audio with additional instructions. Does not
@@ -5,21 +5,21 @@ module OpenAI
5
5
  class Audio
6
6
  # Turn audio into text or text into audio.
7
7
  class Voices
8
- # Creates a voice from a text prompt or from a consent recording and an audio
9
- # sample.
8
+ # Create a custom voice you can use for audio output (for example, in
9
+ # Text-to-Speech and the Realtime API). This requires an audio sample and a
10
+ # previously uploaded consent recording.
10
11
  #
11
- # For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as
12
- # JSON or multipart form data. For creation from an audio sample, send
13
- # `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID
14
- # as multipart form data. The type defaults to `audio_sample` when omitted.
12
+ # Send `name`, `audio_sample`, and the `consent` recording ID as multipart form
13
+ # data. The optional `type` defaults to `audio_sample`.
15
14
  #
16
- # Returns the saved voice's metadata. Voices created from text prompts are
17
- # supported only in Live, not in Realtime or the speech endpoint. The response
18
- # does not include preview audio.
15
+ # Returns the saved voice's metadata. See the
16
+ # [custom voices guide](https://developers.openai.com/api/docs/guides/text-to-speech#custom-voices)
17
+ # for requirements and best practices. Custom voices are limited to eligible
18
+ # customers.
19
19
  #
20
20
  # @overload create(body:, request_options: {})
21
21
  #
22
- # @param body [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt]
22
+ # @param body [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample]
23
23
  # Creates a voice from a consent recording and an audio sample. Requires
24
24
  # multipart/form-data.
25
25
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.101.0"
4
+ VERSION = "0.101.1"
5
5
  end
@@ -33,8 +33,7 @@ module OpenAI
33
33
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
34
34
  # voices are available in the
35
35
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
36
- # Custom voices must be created from audio samples. Voices created from text
37
- # prompts are supported only in Live.
36
+ # Custom voices must be created from audio samples.
38
37
  sig {
39
38
  returns(
40
39
  T.any(
@@ -119,8 +118,7 @@ module OpenAI
119
118
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
120
119
  # voices are available in the
121
120
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
122
- # Custom voices must be created from audio samples. Voices created from text
123
- # prompts are supported only in Live.
121
+ # Custom voices must be created from audio samples.
124
122
  voice:,
125
123
 
126
124
  # Control the voice of your generated audio with additional instructions. Does not
@@ -184,8 +182,7 @@ module OpenAI
184
182
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
185
183
  # voices are available in the
186
184
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
187
- # Custom voices must be created from audio samples. Voices created from text
188
- # prompts are supported only in Live.
185
+ # Custom voices must be created from audio samples.
189
186
  module Voice
190
187
  extend OpenAI::Internal::Type::Union
191
188
 
@@ -30,13 +30,11 @@ module OpenAI
30
30
  sig { returns(Symbol) }
31
31
  attr_accessor :object
32
32
 
33
- # How the voice was created. Voices created from text prompts are supported only
34
- # in Live.
33
+ # How the voice was created.
35
34
  sig { returns(OpenAI::Audio::Voice::Type::TaggedSymbol) }
36
35
  attr_accessor :type
37
36
 
38
- # A custom voice that can be used for audio output. Voices created from text
39
- # prompts are supported only in Live.
37
+ # A custom voice that can be used for audio output.
40
38
  sig do
41
39
  params(
42
40
 
@@ -63,8 +61,7 @@ module OpenAI
63
61
  # The name of the voice.
64
62
  name:,
65
63
 
66
- # How the voice was created. Voices created from text prompts are supported only
67
- # in Live.
64
+ # How the voice was created.
68
65
  type:,
69
66
 
70
67
  # The object type, which is always `audio.voice`.
@@ -87,8 +84,7 @@ module OpenAI
87
84
  def to_hash
88
85
  end
89
86
 
90
- # How the voice was created. Voices created from text prompts are supported only
91
- # in Live.
87
+ # How the voice was created.
92
88
  module Type
93
89
  extend OpenAI::Internal::Type::Enum
94
90
 
@@ -96,7 +92,6 @@ module OpenAI
96
92
  OrSymbol = T.type_alias { T.any(Symbol, String) }
97
93
 
98
94
  AUDIO_SAMPLE = T.let(:audio_sample, OpenAI::Audio::Voice::Type::TaggedSymbol)
99
- PROMPT = T.let(:prompt, OpenAI::Audio::Voice::Type::TaggedSymbol)
100
95
 
101
96
  sig { override.returns(T::Array[OpenAI::Audio::Voice::Type::TaggedSymbol]) }
102
97
  def self.values
@@ -19,20 +19,13 @@ module OpenAI
19
19
 
20
20
  # Creates a voice from a consent recording and an audio sample. Requires
21
21
  # multipart/form-data.
22
- sig {
23
- returns(
24
- T.any(OpenAI::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Audio::VoiceCreateParams::Body::Prompt)
25
- )
26
- }
22
+ sig { returns(OpenAI::Audio::VoiceCreateParams::Body::AudioSample) }
27
23
  attr_accessor :body
28
24
 
29
25
  sig do
30
26
  params(
31
27
 
32
- body: T.any(
33
- OpenAI::Audio::VoiceCreateParams::Body::AudioSample::OrHash,
34
- OpenAI::Audio::VoiceCreateParams::Body::Prompt::OrHash
35
- ),
28
+ body: OpenAI::Audio::VoiceCreateParams::Body::AudioSample::OrHash,
36
29
 
37
30
  request_options: OpenAI::RequestOptions::OrHash
38
31
  )
@@ -50,13 +43,7 @@ module OpenAI
50
43
 
51
44
  sig do
52
45
  override.returns(
53
- {
54
- body: T.any(
55
- OpenAI::Audio::VoiceCreateParams::Body::AudioSample,
56
- OpenAI::Audio::VoiceCreateParams::Body::Prompt
57
- ),
58
- request_options: OpenAI::RequestOptions
59
- }
46
+ {body: OpenAI::Audio::VoiceCreateParams::Body::AudioSample, request_options: OpenAI::RequestOptions}
60
47
  )
61
48
  end
62
49
  def to_hash
@@ -67,9 +54,7 @@ module OpenAI
67
54
  module Body
68
55
  extend OpenAI::Internal::Type::Union
69
56
 
70
- Variants = T.type_alias {
71
- T.any(OpenAI::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Audio::VoiceCreateParams::Body::Prompt)
72
- }
57
+ Variants = T.type_alias { OpenAI::Audio::VoiceCreateParams::Body::AudioSample }
73
58
 
74
59
  class AudioSample < OpenAI::Internal::Type::BaseModel
75
60
  OrHash = T.type_alias do
@@ -177,136 +162,6 @@ module OpenAI
177
162
  end
178
163
  end
179
164
 
180
- class Prompt < OpenAI::Internal::Type::BaseModel
181
- OrHash = T.type_alias do
182
- T.any(
183
- OpenAI::Audio::VoiceCreateParams::Body::Prompt,
184
- OpenAI::Internal::AnyHash
185
- )
186
- end
187
-
188
- # The name of the new voice.
189
- sig { returns(String) }
190
- attr_accessor :name
191
-
192
- # A description of the desired voice. Must not contain only whitespace.
193
- sig { returns(String) }
194
- attr_accessor :prompt
195
-
196
- # Set to `prompt` to create a voice from a text description.
197
- sig { returns(OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::OrSymbol) }
198
- attr_accessor :type
199
-
200
- # The voice creation model to use. Defaults to `auto`.
201
- sig { returns(T.nilable(T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol))) }
202
- attr_reader :model
203
-
204
- sig { params(model: T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol)).void }
205
- attr_writer :model
206
-
207
- # Optional text for the voice to speak during creation. If omitted, a script is
208
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
209
- # that are too short are rejected.
210
- sig { returns(T.nilable(String)) }
211
- attr_reader :script_hint
212
-
213
- sig { params(script_hint: String).void }
214
- attr_writer :script_hint
215
-
216
- # Creates a synthetic voice from a text description. Supports application/json or
217
- # multipart/form-data.
218
- sig do
219
- params(
220
-
221
- name: String,
222
-
223
- prompt: String,
224
-
225
- type: OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::OrSymbol,
226
-
227
- model: T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol),
228
-
229
- script_hint: String
230
- )
231
- .returns(T.attached_class)
232
- end
233
- def self.new(
234
-
235
- # The name of the new voice.
236
- name:,
237
-
238
- # A description of the desired voice. Must not contain only whitespace.
239
- prompt:,
240
-
241
- # Set to `prompt` to create a voice from a text description.
242
- type:,
243
-
244
- # The voice creation model to use. Defaults to `auto`.
245
- model: nil,
246
-
247
- # Optional text for the voice to speak during creation. If omitted, a script is
248
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
249
- # that are too short are rejected.
250
-
251
- script_hint: nil
252
- )
253
- end
254
-
255
- sig do
256
- override.returns(
257
- {
258
- name: String,
259
- prompt: String,
260
- type: OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::OrSymbol,
261
- model: T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol),
262
- script_hint: String
263
- }
264
- )
265
- end
266
- def to_hash
267
- end
268
-
269
- # Set to `prompt` to create a voice from a text description.
270
- module Type
271
- extend OpenAI::Internal::Type::Enum
272
-
273
- TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type) }
274
- OrSymbol = T.type_alias { T.any(Symbol, String) }
275
-
276
- PROMPT = T.let(:prompt, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::TaggedSymbol)
277
-
278
- sig { override.returns(T::Array[OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::TaggedSymbol]) }
279
- def self.values
280
- end
281
- end
282
-
283
- # The voice creation model to use. Defaults to `auto`.
284
- module Model
285
- extend OpenAI::Internal::Type::Union
286
-
287
- Variants = T.type_alias {
288
- T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol)
289
- }
290
-
291
- sig { override.returns(T::Array[OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::Variants]) }
292
- def self.variants
293
- end
294
-
295
- TaggedSymbol = T.type_alias do
296
- T.all(Symbol, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model)
297
- end
298
-
299
- OrSymbol = T.type_alias { T.any(Symbol, String) }
300
-
301
- AUTO = T.let(:auto, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol)
302
- MODEL_2026_10_01 = T.let(
303
- :"2026-10-01",
304
- OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol
305
- )
306
-
307
- end
308
- end
309
-
310
165
  sig { override.returns(T::Array[OpenAI::Audio::VoiceCreateParams::Body::Variants]) }
311
166
  def self.variants
312
167
  end
@@ -25,7 +25,7 @@ module OpenAI
25
25
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
26
26
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
27
27
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
28
- # samples. Voices created from text prompts are supported only in Live.
28
+ # samples.
29
29
  sig {
30
30
  returns(
31
31
  T.any(
@@ -63,7 +63,7 @@ module OpenAI
63
63
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
64
64
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
65
65
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
66
- # samples. Voices created from text prompts are supported only in Live.
66
+ # samples.
67
67
 
68
68
  voice:
69
69
  )
@@ -108,7 +108,7 @@ module OpenAI
108
108
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
109
109
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
110
110
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
111
- # samples. Voices created from text prompts are supported only in Live.
111
+ # samples.
112
112
  module Voice
113
113
  extend OpenAI::Internal::Type::Union
114
114
 
@@ -58,8 +58,7 @@ module OpenAI
58
58
  # `cedar`. You may also provide a custom voice object with an `id`, for example
59
59
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
60
60
  # model has responded with audio at least once. Custom voices must be created from
61
- # audio samples. Voices created from text prompts are supported only in Live. We
62
- # recommend `marin` and `cedar` for best quality.
61
+ # audio samples. We recommend `marin` and `cedar` for best quality.
63
62
  sig {
64
63
  returns(
65
64
  T.nilable(
@@ -123,8 +122,7 @@ module OpenAI
123
122
  # `cedar`. You may also provide a custom voice object with an `id`, for example
124
123
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
125
124
  # model has responded with audio at least once. Custom voices must be created from
126
- # audio samples. Voices created from text prompts are supported only in Live. We
127
- # recommend `marin` and `cedar` for best quality.
125
+ # audio samples. We recommend `marin` and `cedar` for best quality.
128
126
 
129
127
  voice: nil
130
128
  )
@@ -155,8 +153,7 @@ module OpenAI
155
153
  # `cedar`. You may also provide a custom voice object with an `id`, for example
156
154
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
157
155
  # model has responded with audio at least once. Custom voices must be created from
158
- # audio samples. Voices created from text prompts are supported only in Live. We
159
- # recommend `marin` and `cedar` for best quality.
156
+ # audio samples. We recommend `marin` and `cedar` for best quality.
160
157
  module Voice
161
158
  extend OpenAI::Internal::Type::Union
162
159
 
@@ -81,8 +81,7 @@ module OpenAI
81
81
  # `cedar`. You may also provide a custom voice object with an `id`, for example
82
82
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
83
83
  # model has responded with audio at least once. Custom voices must be created from
84
- # audio samples. Voices created from text prompts are supported only in Live. We
85
- # recommend `marin` and `cedar` for best quality.
84
+ # audio samples. We recommend `marin` and `cedar` for best quality.
86
85
  sig {
87
86
  returns(
88
87
  T.nilable(
@@ -135,8 +134,7 @@ module OpenAI
135
134
  # `cedar`. You may also provide a custom voice object with an `id`, for example
136
135
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
137
136
  # model has responded with audio at least once. Custom voices must be created from
138
- # audio samples. Voices created from text prompts are supported only in Live. We
139
- # recommend `marin` and `cedar` for best quality.
137
+ # audio samples. We recommend `marin` and `cedar` for best quality.
140
138
 
141
139
  voice: nil
142
140
  )
@@ -166,8 +164,7 @@ module OpenAI
166
164
  # `cedar`. You may also provide a custom voice object with an `id`, for example
167
165
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
168
166
  # model has responded with audio at least once. Custom voices must be created from
169
- # audio samples. Voices created from text prompts are supported only in Live. We
170
- # recommend `marin` and `cedar` for best quality.
167
+ # audio samples. We recommend `marin` and `cedar` for best quality.
171
168
  module Voice
172
169
  extend OpenAI::Internal::Type::Union
173
170
 
@@ -41,8 +41,7 @@ module OpenAI
41
41
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
42
42
  # voices are available in the
43
43
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
44
- # Custom voices must be created from audio samples. Voices created from text
45
- # prompts are supported only in Live.
44
+ # Custom voices must be created from audio samples.
46
45
  voice:,
47
46
  # Control the voice of your generated audio with additional instructions. Does not
48
47
  # work with `tts-1` or `tts-1-hd`.
@@ -8,23 +8,20 @@ module OpenAI
8
8
  # Turn audio into text or text into audio.
9
9
  class Voices
10
10
 
11
- # Creates a voice from a text prompt or from a consent recording and an audio
12
- # sample.
11
+ # Create a custom voice you can use for audio output (for example, in
12
+ # Text-to-Speech and the Realtime API). This requires an audio sample and a
13
+ # previously uploaded consent recording.
13
14
  #
14
- # For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as
15
- # JSON or multipart form data. For creation from an audio sample, send
16
- # `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID
17
- # as multipart form data. The type defaults to `audio_sample` when omitted.
15
+ # Send `name`, `audio_sample`, and the `consent` recording ID as multipart form
16
+ # data. The optional `type` defaults to `audio_sample`.
18
17
  #
19
- # Returns the saved voice's metadata. Voices created from text prompts are
20
- # supported only in Live, not in Realtime or the speech endpoint. The response
21
- # does not include preview audio.
18
+ # Returns the saved voice's metadata. See the
19
+ # [custom voices guide](https://developers.openai.com/api/docs/guides/text-to-speech#custom-voices)
20
+ # for requirements and best practices. Custom voices are limited to eligible
21
+ # customers.
22
22
  sig {
23
23
  params(
24
- body: T.any(
25
- OpenAI::Audio::VoiceCreateParams::Body::AudioSample::OrHash,
26
- OpenAI::Audio::VoiceCreateParams::Body::Prompt::OrHash
27
- ),
24
+ body: OpenAI::Audio::VoiceCreateParams::Body::AudioSample::OrHash,
28
25
  request_options: OpenAI::RequestOptions::OrHash
29
26
  )
30
27
  .returns(OpenAI::Audio::Voice)
@@ -31,8 +31,7 @@ module OpenAI
31
31
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
32
32
  # voices are available in the
33
33
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
34
- # Custom voices must be created from audio samples. Voices created from text
35
- # prompts are supported only in Live.
34
+ # Custom voices must be created from audio samples.
36
35
  attr_accessor voice: OpenAI::Models::Audio::SpeechCreateParams::voice
37
36
 
38
37
  # Control the voice of your generated audio with additional instructions. Does not
@@ -84,8 +83,7 @@ module OpenAI
84
83
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
85
84
  # voices are available in the
86
85
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
87
- # Custom voices must be created from audio samples. Voices created from text
88
- # prompts are supported only in Live.
86
+ # Custom voices must be created from audio samples.
89
87
  # @param instructions
90
88
  # Control the voice of your generated audio with additional instructions. Does not
91
89
  # work with `tts-1` or `tts-1-hd`.
@@ -23,8 +23,7 @@ module OpenAI
23
23
  # The object type, which is always `audio.voice`.
24
24
  attr_accessor object: :"audio.voice"
25
25
 
26
- # How the voice was created. Voices created from text prompts are supported only
27
- # in Live.
26
+ # How the voice was created.
28
27
  attr_accessor type: OpenAI::Models::Audio::Voice::type_
29
28
 
30
29
  # @param id
@@ -34,8 +33,7 @@ module OpenAI
34
33
  # @param name
35
34
  # The name of the voice.
36
35
  # @param type
37
- # How the voice was created. Voices created from text prompts are supported only
38
- # in Live.
36
+ # How the voice was created.
39
37
  # @param object
40
38
  # The object type, which is always `audio.voice`.
41
39
  def initialize: (
@@ -54,13 +52,12 @@ module OpenAI
54
52
  type: OpenAI::Models::Audio::Voice::type_
55
53
  }
56
54
 
57
- type type_ = :audio_sample | :prompt
55
+ type type_ = :audio_sample
58
56
 
59
57
  module Type
60
58
  extend OpenAI::Internal::Type::Enum
61
59
 
62
60
  AUDIO_SAMPLE: :audio_sample
63
- PROMPT: :prompt
64
61
 
65
62
  def self?.values: -> ::Array[OpenAI::Models::Audio::Voice::type_]
66
63
  end
@@ -28,9 +28,7 @@ module OpenAI
28
28
  ?request_options: OpenAI::RequestOptions
29
29
  }
30
30
 
31
- type body =
32
- OpenAI::Audio::VoiceCreateParams::Body::AudioSample
33
- | OpenAI::Audio::VoiceCreateParams::Body::Prompt
31
+ type body = OpenAI::Audio::VoiceCreateParams::Body::AudioSample
34
32
 
35
33
  module Body
36
34
  extend OpenAI::Internal::Type::Union
@@ -108,93 +106,6 @@ module OpenAI
108
106
  end
109
107
  end
110
108
 
111
- type prompt =
112
- {
113
- name: String,
114
- prompt: String,
115
- type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_,
116
- ?model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model,
117
- ?script_hint: String
118
- }
119
-
120
- class Prompt < OpenAI::Internal::Type::BaseModel
121
- # The name of the new voice.
122
- attr_accessor name: String
123
-
124
- # A description of the desired voice. Must not contain only whitespace.
125
- attr_accessor prompt: String
126
-
127
- # Set to `prompt` to create a voice from a text description.
128
- attr_accessor type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_
129
-
130
- # The voice creation model to use. Defaults to `auto`.
131
- attr_reader model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model?
132
-
133
- # The voice creation model to use. Defaults to `auto`.
134
- def model=: (
135
- OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model
136
- ) -> OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model
137
-
138
- # Optional text for the voice to speak during creation. If omitted, a script is
139
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
140
- # that are too short are rejected.
141
- attr_reader script_hint: String?
142
-
143
- # Optional text for the voice to speak during creation. If omitted, a script is
144
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
145
- # that are too short are rejected.
146
- def script_hint=: (String) -> String
147
-
148
- # @param name
149
- # The name of the new voice.
150
- # @param prompt
151
- # A description of the desired voice. Must not contain only whitespace.
152
- # @param type
153
- # Set to `prompt` to create a voice from a text description.
154
- # @param model
155
- # The voice creation model to use. Defaults to `auto`.
156
- # @param script_hint
157
- # Optional text for the voice to speak during creation. If omitted, a script is
158
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
159
- # that are too short are rejected.
160
- def initialize: (
161
- name: String,
162
- prompt: String,
163
- type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_,
164
- ?model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model,
165
- ?script_hint: String
166
- ) -> void
167
-
168
- def to_hash: -> {
169
- name: String,
170
- prompt: String,
171
- type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_,
172
- ?model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model,
173
- ?script_hint: String
174
- }
175
-
176
- type type_ = :prompt
177
-
178
- module Type
179
- extend OpenAI::Internal::Type::Enum
180
-
181
- PROMPT: :prompt
182
-
183
- def self?.values: -> ::Array[OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_]
184
- end
185
-
186
- type model = String | :auto | :"2026-10-01"
187
-
188
- module Model
189
- extend OpenAI::Internal::Type::Union
190
-
191
- def self?.variants: -> ::Array[OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model]
192
-
193
- AUTO: :auto
194
- MODEL_2026_10_01: :"2026-10-01"
195
- end
196
- end
197
-
198
109
  def self?.variants: -> ::Array[OpenAI::Models::Audio::VoiceCreateParams::body]
199
110
  end
200
111
  end
@@ -18,7 +18,7 @@ module OpenAI
18
18
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
19
19
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
20
20
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
21
- # samples. Voices created from text prompts are supported only in Live.
21
+ # samples.
22
22
  attr_accessor voice: OpenAI::Models::Chat::ChatCompletionAudioParam::voice
23
23
 
24
24
  # @param format_
@@ -29,7 +29,7 @@ module OpenAI
29
29
  # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
30
30
  # `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
31
31
  # for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
32
- # samples. Voices created from text prompts are supported only in Live.
32
+ # samples.
33
33
  def initialize: (
34
34
  format_: OpenAI::Models::Chat::ChatCompletionAudioParam::format_,
35
35
  voice: OpenAI::Models::Chat::ChatCompletionAudioParam::voice
@@ -40,8 +40,7 @@ module OpenAI
40
40
  # `cedar`. You may also provide a custom voice object with an `id`, for example
41
41
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
42
42
  # model has responded with audio at least once. Custom voices must be created from
43
- # audio samples. Voices created from text prompts are supported only in Live. We
44
- # recommend `marin` and `cedar` for best quality.
43
+ # audio samples. We recommend `marin` and `cedar` for best quality.
45
44
  attr_reader voice: OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice?
46
45
 
47
46
  # The voice the model uses to respond. Supported built-in voices are `alloy`,
@@ -49,8 +48,7 @@ module OpenAI
49
48
  # `cedar`. You may also provide a custom voice object with an `id`, for example
50
49
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
51
50
  # model has responded with audio at least once. Custom voices must be created from
52
- # audio samples. Voices created from text prompts are supported only in Live. We
53
- # recommend `marin` and `cedar` for best quality.
51
+ # audio samples. We recommend `marin` and `cedar` for best quality.
54
52
  def voice=: (
55
53
  OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
56
54
  ) -> OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
@@ -71,8 +69,7 @@ module OpenAI
71
69
  # `cedar`. You may also provide a custom voice object with an `id`, for example
72
70
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
73
71
  # model has responded with audio at least once. Custom voices must be created from
74
- # audio samples. Voices created from text prompts are supported only in Live. We
75
- # recommend `marin` and `cedar` for best quality.
72
+ # audio samples. We recommend `marin` and `cedar` for best quality.
76
73
  def initialize: (
77
74
  ?format_: OpenAI::Models::Realtime::realtime_audio_formats,
78
75
  ?speed: Float,
@@ -39,8 +39,7 @@ module OpenAI
39
39
  # `cedar`. You may also provide a custom voice object with an `id`, for example
40
40
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
41
41
  # model has responded with audio at least once. Custom voices must be created from
42
- # audio samples. Voices created from text prompts are supported only in Live. We
43
- # recommend `marin` and `cedar` for best quality.
42
+ # audio samples. We recommend `marin` and `cedar` for best quality.
44
43
  attr_reader voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice?
45
44
 
46
45
  # The voice the model uses to respond. Supported built-in voices are `alloy`,
@@ -48,8 +47,7 @@ module OpenAI
48
47
  # `cedar`. You may also provide a custom voice object with an `id`, for example
49
48
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
50
49
  # model has responded with audio at least once. Custom voices must be created from
51
- # audio samples. Voices created from text prompts are supported only in Live. We
52
- # recommend `marin` and `cedar` for best quality.
50
+ # audio samples. We recommend `marin` and `cedar` for best quality.
53
51
  def voice=: (
54
52
  OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
55
53
  ) -> OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
@@ -62,8 +60,7 @@ module OpenAI
62
60
  # `cedar`. You may also provide a custom voice object with an `id`, for example
63
61
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
64
62
  # model has responded with audio at least once. Custom voices must be created from
65
- # audio samples. Voices created from text prompts are supported only in Live. We
66
- # recommend `marin` and `cedar` for best quality.
63
+ # audio samples. We recommend `marin` and `cedar` for best quality.
67
64
  def initialize: (
68
65
  ?format_: OpenAI::Models::Realtime::realtime_audio_formats,
69
66
  ?voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.101.0
4
+ version: 0.101.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAI