Class RealtimeBaseTranscript.Builder
- java.lang.Object
-
- com.assemblyai.api.resources.realtime.types.RealtimeBaseTranscript.Builder
-
- All Implemented Interfaces:
RealtimeBaseTranscript._FinalStage,RealtimeBaseTranscript.AudioEndStage,RealtimeBaseTranscript.AudioStartStage,RealtimeBaseTranscript.ConfidenceStage,RealtimeBaseTranscript.CreatedStage,RealtimeBaseTranscript.TextStage
- Enclosing class:
- RealtimeBaseTranscript
public static final class RealtimeBaseTranscript.Builder extends java.lang.Object implements RealtimeBaseTranscript.AudioStartStage, RealtimeBaseTranscript.AudioEndStage, RealtimeBaseTranscript.ConfidenceStage, RealtimeBaseTranscript.TextStage, RealtimeBaseTranscript.CreatedStage, RealtimeBaseTranscript._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RealtimeBaseTranscript._FinalStageaddAllWords(java.util.List<Word> words)An array of objects, with the information for each word in the transcription text.RealtimeBaseTranscript._FinalStageaddWords(Word words)An array of objects, with the information for each word in the transcription text.RealtimeBaseTranscript.ConfidenceStageaudioEnd(int audioEnd)End time of audio sample relative to session start, in millisecondsRealtimeBaseTranscript.AudioEndStageaudioStart(int audioStart)Start time of audio sample relative to session start, in millisecondsRealtimeBaseTranscriptbuild()RealtimeBaseTranscript.TextStageconfidence(double confidence)The confidence score of the entire transcription, between 0 and 1RealtimeBaseTranscript._FinalStagecreated(java.time.OffsetDateTime created)The timestamp for the partial transcriptRealtimeBaseTranscript.Builderfrom(RealtimeBaseTranscript other)RealtimeBaseTranscript.CreatedStagetext(java.lang.String text)The partial transcript for your audioRealtimeBaseTranscript._FinalStagewords(java.util.List<Word> words)
-
-
-
Method Detail
-
from
public RealtimeBaseTranscript.Builder from(RealtimeBaseTranscript other)
- Specified by:
fromin interfaceRealtimeBaseTranscript.AudioStartStage
-
audioStart
public RealtimeBaseTranscript.AudioEndStage audioStart(int audioStart)
Start time of audio sample relative to session start, in milliseconds
- Specified by:
audioStartin interfaceRealtimeBaseTranscript.AudioStartStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
audioEnd
public RealtimeBaseTranscript.ConfidenceStage audioEnd(int audioEnd)
End time of audio sample relative to session start, in milliseconds
- Specified by:
audioEndin interfaceRealtimeBaseTranscript.AudioEndStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
confidence
public RealtimeBaseTranscript.TextStage confidence(double confidence)
The confidence score of the entire transcription, between 0 and 1
- Specified by:
confidencein interfaceRealtimeBaseTranscript.ConfidenceStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
text
public RealtimeBaseTranscript.CreatedStage text(java.lang.String text)
The partial transcript for your audio
- Specified by:
textin interfaceRealtimeBaseTranscript.TextStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
created
public RealtimeBaseTranscript._FinalStage created(java.time.OffsetDateTime created)
The timestamp for the partial transcript
- Specified by:
createdin interfaceRealtimeBaseTranscript.CreatedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addAllWords
public RealtimeBaseTranscript._FinalStage addAllWords(java.util.List<Word> words)
An array of objects, with the information for each word in the transcription text. Includes the start and end time of the word in milliseconds, the confidence score of the word, and the text, which is the word itself.
- Specified by:
addAllWordsin interfaceRealtimeBaseTranscript._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addWords
public RealtimeBaseTranscript._FinalStage addWords(Word words)
An array of objects, with the information for each word in the transcription text. Includes the start and end time of the word in milliseconds, the confidence score of the word, and the text, which is the word itself.
- Specified by:
addWordsin interfaceRealtimeBaseTranscript._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
words
public RealtimeBaseTranscript._FinalStage words(java.util.List<Word> words)
- Specified by:
wordsin interfaceRealtimeBaseTranscript._FinalStage
-
build
public RealtimeBaseTranscript build()
- Specified by:
buildin interfaceRealtimeBaseTranscript._FinalStage
-
-