Class: OpenAI::Models::Audio::SpeechCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Audio::SpeechCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/audio/speech_create_params.rb
Overview
Defined Under Namespace
Modules: Model, ResponseFormat, StreamFormat, Voice
Instance Attribute Summary collapse
-
#input ⇒ String
The text to generate audio for.
-
#instructions ⇒ String?
Control the voice of your generated audio with additional instructions.
-
#model ⇒ String, ...
One of the available TTS models:
tts-1,tts-1-hdorgpt-4o-mini-tts. -
#response_format ⇒ Symbol, ...
The format to audio in.
-
#speed ⇒ Float?
The speed of the generated audio.
-
#stream_format ⇒ Symbol, ...
The format to stream the audio in.
-
#voice ⇒ String, ...
The voice to use when generating the audio.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input: , model: , voice: , instructions: nil, response_format: nil, speed: nil, stream_format: nil, request_options: {}) ⇒ void
constructor
Some parameter documentations has been truncated, see SpeechCreateParams for more details.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(input: , model: , voice: , instructions: nil, response_format: nil, speed: nil, stream_format: nil, request_options: {}) ⇒ void
Some parameter documentations has been truncated, see OpenAI::Models::Audio::SpeechCreateParams for more details.
|
|
# File 'lib/openai/models/audio/speech_create_params.rb', line 61
|
Instance Attribute Details
#input ⇒ String
The text to generate audio for. The maximum length is 4096 characters.
15 |
# File 'lib/openai/models/audio/speech_create_params.rb', line 15 required :input, String |
#instructions ⇒ String?
Control the voice of your generated audio with additional instructions. Does not
work with tts-1 or tts-1-hd.
38 |
# File 'lib/openai/models/audio/speech_create_params.rb', line 38 optional :instructions, String |
#model ⇒ String, ...
One of the available TTS models:
tts-1, tts-1-hd or gpt-4o-mini-tts.
22 |
# File 'lib/openai/models/audio/speech_create_params.rb', line 22 required :model, union: -> { OpenAI::Audio::SpeechCreateParams::Model } |
#response_format ⇒ Symbol, ...
The format to audio in. Supported formats are mp3, opus, aac, flac,
wav, and pcm.
45 |
# File 'lib/openai/models/audio/speech_create_params.rb', line 45 optional :response_format, enum: -> { OpenAI::Audio::SpeechCreateParams::ResponseFormat } |
#speed ⇒ Float?
The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is
the default.
52 |
# File 'lib/openai/models/audio/speech_create_params.rb', line 52 optional :speed, Float |
#stream_format ⇒ Symbol, ...
The format to stream the audio in. Supported formats are sse and audio.
sse is not supported for tts-1 or tts-1-hd.
59 |
# File 'lib/openai/models/audio/speech_create_params.rb', line 59 optional :stream_format, enum: -> { OpenAI::Audio::SpeechCreateParams::StreamFormat } |
#voice ⇒ String, ...
The voice to use when generating the audio. Supported voices are alloy, ash,
ballad, coral, echo, fable, onyx, nova, sage, shimmer, and
verse. Previews of the voices are available in the
Text to speech guide.
31 |
# File 'lib/openai/models/audio/speech_create_params.rb', line 31 required :voice, union: -> { OpenAI::Audio::SpeechCreateParams::Voice } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/audio/speech_create_params.rb', line 153
|
.variants ⇒ Array(String, Symbol, OpenAI::Models::Audio::SpeechModel)
|
|
# File 'lib/openai/models/audio/speech_create_params.rb', line 91
|