Package ai.picovoice.leopard
Class LeopardTranscript.Word
- java.lang.Object
-
- ai.picovoice.leopard.LeopardTranscript.Word
-
- Enclosing class:
- LeopardTranscript
public static class LeopardTranscript.Word extends java.lang.ObjectClass for storing word metadata.
-
-
Constructor Summary
Constructors Constructor Description Word(java.lang.String word, float confidence, float startSec, float endSec, int speakerTag)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetConfidence()Getter for the transcription confidence.floatgetEndSec()Getter for the end of word in seconds.intgetSpeakerTag()Getter for the speaker tag.floatgetStartSec()Getter for the start of word in seconds.java.lang.StringgetWord()Getter for the transcribed word.
-
-
-
Constructor Detail
-
Word
public Word(java.lang.String word, float confidence, float startSec, float endSec, int speakerTag)Constructor.- Parameters:
word- Transcribed word.confidence- Transcription confidence. It is a number within [0, 1].startSec- Start of word in seconds.endSec- End of word in seconds.speakerTag- The speaker tag is `-1` if diarization is not enabled during initialization; otherwise, it's a non-negative integer identifying unique speakers, with `0` reserved for unknown speakers
-
-
Method Detail
-
getWord
public java.lang.String getWord()
Getter for the transcribed word.- Returns:
- Transcribed word.
-
getConfidence
public float getConfidence()
Getter for the transcription confidence.- Returns:
- Transcription confidence. It is a number within [0, 1].
-
getStartSec
public float getStartSec()
Getter for the start of word in seconds.- Returns:
- Start of word in seconds.
-
getEndSec
public float getEndSec()
Getter for the end of word in seconds.- Returns:
- End of word in seconds.
-
getSpeakerTag
public int getSpeakerTag()
Getter for the speaker tag.- Returns:
- Speaker tag.
-
-