Class LeopardTranscript.Word

  • Enclosing class:
    LeopardTranscript

    public static class LeopardTranscript.Word
    extends java.lang.Object
    Class 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
      float getConfidence()
      Getter for the transcription confidence.
      float getEndSec()
      Getter for the end of word in seconds.
      int getSpeakerTag()
      Getter for the speaker tag.
      float getStartSec()
      Getter for the start of word in seconds.
      java.lang.String getWord()
      Getter for the transcribed word.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.