Class DashScopeWebSocketAsrApi
java.lang.Object
com.alibaba.cloud.ai.dashscope.api.asr.DashScopeWebSocketAsrApi
DashScope WebSocket ASR API for Paraformer, Fun-ASR, and Gummy models.
Uses run-task / binary / finish-task protocol (same as dashscope-sdk Recognition and TranslationRecognizer).
- Author:
- spring-ai-alibaba
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()reactor.core.publisher.Flux<String>stream(ByteBuffer binaryData, DashScopeAudioTranscriptionOptions options) One-shot binary input: run-task → task-started → binary data → finish-task.reactor.core.publisher.Flux<String>stream(reactor.core.publisher.Flux<ByteBuffer> audioStream, DashScopeAudioTranscriptionOptions options) Bidirectional streaming: run-task → task-started → N * sendBinary(chunk) → finish-task.
-
Constructor Details
-
DashScopeWebSocketAsrApi
-
-
Method Details
-
stream
public reactor.core.publisher.Flux<String> stream(ByteBuffer binaryData, DashScopeAudioTranscriptionOptions options) One-shot binary input: run-task → task-started → binary data → finish-task. Suitable for pre-recorded audio (e.g., from file or Resource). -
stream
public reactor.core.publisher.Flux<String> stream(reactor.core.publisher.Flux<ByteBuffer> audioStream, DashScopeAudioTranscriptionOptions options) Bidirectional streaming: run-task → task-started → N * sendBinary(chunk) → finish-task. Suitable for real-time microphone input. -
builder
-