Class TranscriptParagraph.Builder
- java.lang.Object
-
- com.assemblyai.api.resources.transcripts.types.TranscriptParagraph.Builder
-
- All Implemented Interfaces:
TranscriptParagraph._FinalStage,TranscriptParagraph.ConfidenceStage,TranscriptParagraph.EndStage,TranscriptParagraph.StartStage,TranscriptParagraph.TextStage
- Enclosing class:
- TranscriptParagraph
public static final class TranscriptParagraph.Builder extends java.lang.Object implements TranscriptParagraph.TextStage, TranscriptParagraph.StartStage, TranscriptParagraph.EndStage, TranscriptParagraph.ConfidenceStage, TranscriptParagraph._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TranscriptParagraph._FinalStageaddAllWords(java.util.List<TranscriptWord> words)TranscriptParagraph._FinalStageaddWords(TranscriptWord words)TranscriptParagraphbuild()TranscriptParagraph._FinalStageconfidence(double confidence)TranscriptParagraph.ConfidenceStageend(int end)TranscriptParagraph.Builderfrom(TranscriptParagraph other)TranscriptParagraph._FinalStagespeaker(java.lang.String speaker)The speaker of the sentence if Speaker Diarization is enabled, else nullTranscriptParagraph._FinalStagespeaker(java.util.Optional<java.lang.String> speaker)TranscriptParagraph.EndStagestart(int start)TranscriptParagraph.StartStagetext(java.lang.String text)TranscriptParagraph._FinalStagewords(java.util.List<TranscriptWord> words)
-
-
-
Method Detail
-
from
public TranscriptParagraph.Builder from(TranscriptParagraph other)
- Specified by:
fromin interfaceTranscriptParagraph.TextStage
-
text
public TranscriptParagraph.StartStage text(java.lang.String text)
- Specified by:
textin interfaceTranscriptParagraph.TextStage
-
start
public TranscriptParagraph.EndStage start(int start)
- Specified by:
startin interfaceTranscriptParagraph.StartStage
-
end
public TranscriptParagraph.ConfidenceStage end(int end)
- Specified by:
endin interfaceTranscriptParagraph.EndStage
-
confidence
public TranscriptParagraph._FinalStage confidence(double confidence)
- Specified by:
confidencein interfaceTranscriptParagraph.ConfidenceStage
-
speaker
public TranscriptParagraph._FinalStage speaker(java.lang.String speaker)
The speaker of the sentence if Speaker Diarization is enabled, else null
- Specified by:
speakerin interfaceTranscriptParagraph._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
speaker
public TranscriptParagraph._FinalStage speaker(java.util.Optional<java.lang.String> speaker)
- Specified by:
speakerin interfaceTranscriptParagraph._FinalStage
-
addAllWords
public TranscriptParagraph._FinalStage addAllWords(java.util.List<TranscriptWord> words)
- Specified by:
addAllWordsin interfaceTranscriptParagraph._FinalStage
-
addWords
public TranscriptParagraph._FinalStage addWords(TranscriptWord words)
- Specified by:
addWordsin interfaceTranscriptParagraph._FinalStage
-
words
public TranscriptParagraph._FinalStage words(java.util.List<TranscriptWord> words)
- Specified by:
wordsin interfaceTranscriptParagraph._FinalStage
-
build
public TranscriptParagraph build()
- Specified by:
buildin interfaceTranscriptParagraph._FinalStage
-
-