AudioSegment

One speaker segment of an audio/video transcript (issue

Properties

Name

Type

Description

Notes

start

float

Segment start time in seconds.

end

float

Segment end time in seconds. Null if unknown (rare edge cases).

[optional]

speaker

str

Assigned/display speaker name for the segment: the name inferred by the LLM (e.g. "Alice") when available, otherwise the raw diarization label. Empty if not diarized.

original_speaker

str

Raw diarization speaker label for the segment (e.g. "SPEAKER_01", "SPEAKER_-1" for the unknown speaker). Preserved alongside `speaker` because the LLM may map two distinct diarization speakers onto the same name; this exposes what the diarization model actually distinguished. Empty for non-diarized/scene segments.

[optional]

text

str

Transcribed text of the segment.

type

str

Segment kind for video transcripts (e.g. scene vs speech); absent for audio.

[optional]

Example

from h2ogpte.rest_async.models.audio_segment import AudioSegment

# TODO update the JSON string below
json = "{}"
# create an instance of AudioSegment from a JSON string
audio_segment_instance = AudioSegment.from_json(json)
# print the JSON string representation of the object
print(AudioSegment.to_json())

# convert the object into a dict
audio_segment_dict = audio_segment_instance.to_dict()
# create an instance of AudioSegment from a dict
audio_segment_from_dict = AudioSegment.from_dict(audio_segment_dict)