Skip to content

OpenAI.AudioGeneration.CreateRaw

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

Method signatures

 Shared Function CreateRaw(Request As OpenAI.Request) As MemoryBlock
 Shared Function CreateRaw(Input As String, Model As OpenAI.Model, Voice As String, Speed As Double = 1.0, ResponseFormat As String = "mp3") As MemoryBlock

Parameters

CreateRaw(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 MemoryBlock containing the raw audio data. The type of response depends on the ResponseFormat specified by the request.

See also

Clone this wiki locally