class

OpenAI::TranscriptTextSegmentEvent

Inherits JSON::Serializable < Reference < Object

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.

Constructors

new(type_value : TranscriptTextSegmentEventType = TranscriptTextSegmentEventType::TranscriptTextSegment, id : String = "", start : Float32 = 0.0, end_value : Float32 = 0.0, text : String = "", speaker : String = "")
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

end_value

End timestamp of the segment in seconds.

Source
end_value=(end_value : Float32)

End timestamp of the segment in seconds.

Source
id

Unique identifier for the segment.

Source
id=(id : String)

Unique identifier for the segment.

Source
speaker

Speaker label for this segment.

Source
speaker=(speaker : String)

Speaker label for this segment.

Source
start

Start timestamp of the segment in seconds.

Source
start=(start : Float32)

Start timestamp of the segment in seconds.

Source
text

Transcript text for this segment.

Source
text=(text : String)

Transcript text for this segment.

Source
type_value

The type of the event. Always transcript.text.segment.

Source
type_value=(type_value : TranscriptTextSegmentEventType)

The type of the event. Always transcript.text.segment.

Source