Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Audio

ModelsExpand Collapse
type AudioModel string
type AudioResponseFormat string

The format of the output, in one of these options: json, text, srt, verbose_json, vtt, or diarized_json. For gpt-4o-transcribe and gpt-4o-mini-transcribe, the only supported format is json. For gpt-4o-transcribe-diarize, the supported formats are json, text, and diarized_json, with diarized_json required to receive speaker annotations.

AudioSpeech

Turn audio into text or text into audio.

Create speech
client.Audio.Speech.New(ctx, body) (*Response, error)
POST/audio/speech
ModelsExpand Collapse
type SpeechModel string

AudioTranscriptions

Turn audio into text or text into audio.

Create transcription
client.Audio.Transcriptions.New(ctx, body) (*AudioTranscriptionNewResponseUnion, error)
POST/audio/transcriptions
ModelsExpand Collapse
type Transcription struct{…}

Represents a transcription response returned by model, based on the provided input.

type TranscriptionDiarized struct{…}

Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.

type TranscriptionDiarizedSegment struct{…}

A segment of diarized transcript text with speaker metadata.

type TranscriptionInclude string
type TranscriptionLanguage struct{…}

A language detected in transcribed audio.

type TranscriptionSegment struct{…}
type TranscriptionStreamEventUnion interface{…}

Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you create a transcription with stream set to true and response_format set to diarized_json.

type TranscriptionTextDeltaEvent struct{…}

Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you create a transcription with the Stream parameter set to true.

type TranscriptionTextDoneEvent struct{…}

Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you create a transcription with the Stream parameter set to true.

type TranscriptionTextSegmentEvent struct{…}

Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you create a transcription with stream set to true and response_format set to diarized_json.

type TranscriptionVerbose struct{…}

Represents a verbose json transcription response returned by model, based on the provided input.

type TranscriptionWord struct{…}

AudioTranslations

Turn audio into text or text into audio.

Create translation
client.Audio.Translations.New(ctx, body) (*Translation, error)
POST/audio/translations
ModelsExpand Collapse
type Translation struct{…}
type TranslationVerbose struct{…}

AudioVoice Consents

Turn audio into text or text into audio.

AudioVoices

Turn audio into text or text into audio.