Class TranscriptResult#

Class Documentation#

class TranscriptResult#

Parses a “<name>.transcript.json” file written by analysis/run_diarize.py into a queryable in-memory structure, for the Analysis tab’s Speaker Diarization plugin (transcript table + playback-synced highlighting).

Usage:

auto result = TranscriptResult::load(jsonPath);
if (result.is_valid()) { ... }

Public Functions

TranscriptResult() = default#
inline bool is_valid() const#
inline bool has_diarization() const#
inline const QString &source_audio() const#
inline const QString &language() const#
inline const QVector<TranscriptSegment> &segments() const#
const TranscriptSegment *segment_at(int64_t ms) const#

Binary search by start time (segments() is chronological, matching run_diarize.py’s write order). Returns nullptr if ms falls in a gap between segments, before the first, or after the last one ends.

Public Static Functions

static TranscriptResult load(const QString &jsonPath)#

Parses jsonPath. Returns a default-constructed (is_valid() == false) result if the file is missing or malformed.