AI::OpenAI::OpenAISpeechRequest
Inherits JSON::Serializable < Struct < Value < Object
Request body for OpenAI speech generation API.
https://platform.openai.com/docs/api-reference/audio/createSpeech
Constructors
new(model : String, input : String, voice : String, response_format : String | Nil = nil, speed : Float64 | Nil = nil, instructions : String | Nil = nil)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
response_format
The format to return audio in. Supported formats: mp3, opus, aac, flac, wav, pcm. Default: mp3
voice
The voice to use when generating the audio. Supported voices: alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, verse.