Skip to content

OpenAI.AudioGeneration.Create

Andrew Lambert edited this page Dec 12, 2023 · 3 revisions

Method signatures

 Shared Function Create(Request As OpenAI.Request) As OpenAI.AudioGeneration
 Shared Function Create(Input As String, Model As OpenAI.Model, Voice As String, Speed As Single = 1.0, ResponseFormat As String = "mp3") As OpenAI.AudioGeneration

Parameters

Create(OpenAI.Request)

Name Type Comment
Request Request An OpenAI request object.

Create(FolderItem, OpenAI.Model, String, Single, String)

Name Type Comment
Input String The text to speak.
Model Model The TTS model to use.
Voice String The AI voice to use. Valid values are "alloy", "echo", "fable", "onyx", "nova", and "shimmer". Audio samples of these voices are available in the OpenAI documentation.
Speed Single Optional. If specified, how fast the AI should speak. Valid values are between 0.25 and 4.0.
ResponseFormat String Optional. If specified, the audio file format to return. Valid values are "mp3", "opus", "aac", and "flac".

Return value

Returns a new instance of OpenAI.AudioGeneration containing the response to the request.

See also

Clone this wiki locally