struct

AI::OpenAI::OpenAITranscriptionResponse

Inherits JSON::Serializable < Struct < Value < Object

Response from OpenAI transcription API.

Constructors

new(text : String, language : String | Nil = nil, duration : Float64 | Nil = nil, words : Array(OpenAITranscriptionWord) | Nil = nil, segments : Array(OpenAITranscriptionSegment) | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

duration

The duration of the audio in seconds.

Source
language

The detected language of the audio (full name, e.g., "english").

Source
segments

Segment-level timing information (when timestamp_granularities includes "segment").

Source
text

The transcribed text.

Source
words

Word-level timing information (when timestamp_granularities includes "word").

Source