-
-
Notifications
You must be signed in to change notification settings - Fork 6
OpenAI.AudioTranslation
Andrew Lambert edited this page Jul 14, 2024
·
7 revisions
OpenAI.AudioTranslation
Protected Class AudioTranslation
Inherits OpenAI.AudioTranscription
This class represents an API audio translation response. Refer to the OpenAI documentation on the /v1/audio/translations
endpoint for further details.
This example uploads a file for translation:
OpenAI.APIKey = "YOUR API KEY"
Dim file As FolderItem = SpecialFolder.Desktop.Child("speech.mp3")
Dim reply As OpenAI.Response = OpenAI.AudioTranslation.Create(file)
Dim translation As String = reply.GetResult()
This example requests the output in raw SRT (subtitles file) format.
OpenAI.APIKey = "YOUR API KEY"
Dim file As FolderItem = SpecialFolder.Desktop.Child("speech.mp3")
Dim translation As String = OpenAI.AudioTranslation.CreateRaw(file, "srt")
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.