Interface StreamingTranscriptionModel
- All Superinterfaces:
StreamingModel<AudioTranscriptionPrompt,AudioTranscriptionResponse>
- All Known Subinterfaces:
TranscriptionModel
- All Known Implementing Classes:
OpenAiAudioTranscriptionModel
public interface StreamingTranscriptionModel
extends StreamingModel<AudioTranscriptionPrompt,AudioTranscriptionResponse>
Interface for the streaming transcription model. This extends
StreamingModel to
provide a streaming API for speech-to-text transcription, where audio input is
converted to text output incrementally.- Since:
- 2.0.1
- Author:
- guan xu
-
Method Summary
Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Flux<AudioTranscriptionResponse>stream(AudioTranscriptionPrompt transcriptionPrompt) Streams a transcription request to the model, returning the transcription results incrementally as they become available.default reactor.core.publisher.Flux<String>streamTranscribe(org.springframework.core.io.Resource resource) A convenience method for streaming the transcription of an audio resource.default reactor.core.publisher.Flux<String>streamTranscribe(org.springframework.core.io.Resource resource, @Nullable AudioTranscriptionOptions options) A convenience method for streaming the transcription of an audio resource with the given options.
-
Method Details
-
stream
default reactor.core.publisher.Flux<AudioTranscriptionResponse> stream(AudioTranscriptionPrompt transcriptionPrompt) Streams a transcription request to the model, returning the transcription results incrementally as they become available.- Specified by:
streamin interfaceStreamingModel<AudioTranscriptionPrompt,AudioTranscriptionResponse> - Parameters:
transcriptionPrompt- the transcription prompt containing the audio input and options- Returns:
- a
FluxofAudioTranscriptionResponsechunks representing incremental transcription results
-
streamTranscribe
default reactor.core.publisher.Flux<String> streamTranscribe(org.springframework.core.io.Resource resource) A convenience method for streaming the transcription of an audio resource.- Parameters:
resource- the audio resource to transcribe- Returns:
- a
Fluxof transcribed text segments
-
streamTranscribe
default reactor.core.publisher.Flux<String> streamTranscribe(org.springframework.core.io.Resource resource, @Nullable AudioTranscriptionOptions options) A convenience method for streaming the transcription of an audio resource with the given options.- Parameters:
resource- the audio resource to transcribeoptions- the transcription options- Returns:
- a
Fluxof transcribed text segments
-