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