Interface TranscriptionStreamEvent.Visitor
-
- All Implemented Interfaces:
public interface TranscriptionStreamEvent.Visitor<T extends Object>
An interface that defines how to map each variant of TranscriptionStreamEvent to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract T
visitTranscriptTextDelta(TranscriptionTextDeltaEvent transcriptTextDelta)
Emitted when there is an additional text delta. abstract T
visitTranscriptTextDone(TranscriptionTextDoneEvent transcriptTextDone)
Emitted when the transcription is complete. T
unknown(JsonValue json)
Maps an unknown variant of TranscriptionStreamEvent to a value of type T. -
-
Method Detail
-
visitTranscriptTextDelta
abstract T visitTranscriptTextDelta(TranscriptionTextDeltaEvent transcriptTextDelta)
Emitted when there is an additional text delta. This is also the first event emitted when the transcription starts. Only emitted when you create a transcription with the
Stream
parameter set totrue
.
-
visitTranscriptTextDone
abstract T visitTranscriptTextDone(TranscriptionTextDoneEvent transcriptTextDone)
Emitted when the transcription is complete. Contains the complete transcription text. Only emitted when you create a transcription with the
Stream
parameter set totrue
.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of TranscriptionStreamEvent to a value of type T.
An instance of TranscriptionStreamEvent can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-