-
-
Notifications
You must be signed in to change notification settings - Fork 7
OpenAI.AudioGeneration.CreateRaw
Andrew Lambert edited this page Dec 12, 2023
·
2 revisions
OpenAI.AudioGeneration.CreateRaw
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
Name | Type | Comment |
---|---|---|
Request | Request | An OpenAI request object. |
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" . |
Returns a MemoryBlock
containing the raw audio data. The type of response depends on the ResponseFormat
specified by the request.
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2023-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.