TranscriptSegment

parley · voice, data-model, transcript, immutable

Immutable transcript segment with start time, end time, and text content.

// Source: https://github.com/pathorsAI/parley | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import Foundation

/// One transcript segment, mirroring the desktop wire shape
/// (`TranscriptEvent` in `src-tauri/src/transcription/common.rs` and
/// `TranscriptSegment` in `src/lib/types.ts`).
///
/// Identity rules (the UI upserts by `id`):
/// - A committed run keeps re-emitting under the same `"{source}-{index}"` id
///   while it grows; the index advances only on endpoint/speaker change.
/// - The tentative tail always uses the stable `"{source}-tail"` id; an empty
///   `text` clears it.
public struct TranscriptSegment: Equatable, Sendable, Codable {
    public let id: String
 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key