TransSegment

@Serializable
data class TransSegment(val id: Int, val type: String? = null, val lyrics: String, val relatedSeg: Int? = null, val timeStamp: List<Double>, val trans: List<TransNote>)

A segment within a transcription file.

For singalong lessons, each segment is one phrase (type and relatedSeg absent). For singafter lessons, each phrase is two segments: a teacher_vocal (the reference window) and a student_vocal (the recording window), cross-linked by relatedSeg (each points at the other's id).

Constructors

Link copied to clipboard
constructor(id: Int, type: String? = null, lyrics: String, relatedSeg: Int? = null, timeStamp: List<Double>, trans: List<TransNote>)

Properties

Link copied to clipboard
Link copied to clipboard
val id: Int

Segment identifier (legacy authoring uses int(startTime), so it is not a 0-based index)

Link copied to clipboard

Text lyrics for this segment

Link copied to clipboard
@SerialName(value = "related_seg")
val relatedSeg: Int?

For singafter, the id of the paired segment; null otherwise

Link copied to clipboard
Link copied to clipboard
@SerialName(value = "time_stamp")
val timeStamp: List<Double>

Start and end timestamps start, end in seconds

Link copied to clipboard

List of notes in this segment

Link copied to clipboard
val type: String?

Segment role: "teacher_vocal" / "student_vocal" for singafter; null for singalong