WordTimestamp

org.llm4s.speech.stt.WordTimestamp
See theWordTimestamp companion object
final case class WordTimestamp(word: String, startSec: Double, endSec: Double, speakerId: Option[Int], confidence: Option[Double])

Word-level timestamp information from transcription with optional speaker identification.

Value parameters

confidence

Optional confidence score (0.0-1.0)

endSec

End time in seconds

speakerId

Optional speaker identifier for diarized content (int-based for efficiency)

startSec

Start time in seconds (relative to audio start)

word

The word text

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def duration: Double
def meetsConfidence(minConfidence: Double): Boolean

Check if this word meets or exceeds minimum confidence threshold (treats missing confidence as passing - provider doesn't provide it)

Check if this word meets or exceeds minimum confidence threshold (treats missing confidence as passing - provider doesn't provide it)

Attributes

def withTimeAdjustment(startOffset: Double, endOffset: Double): WordTimestamp

Create a new WordTimestamp with adjusted times (e.g., trimming silence)

Create a new WordTimestamp with adjusted times (e.g., trimming silence)

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product