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