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 DiarizationStatus diarization_status() const

Why speaker labels are or aren’t present. Unknown for files written before this field existed.

inline const QString &diarization_detail() const

The Python side’s own sentence about it — for LoadFailed this is the verbatim exception text, which is the only thing that distinguishes a bad token from an unaccepted licence. May be empty.

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.