Interface TranscribeStreamingAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
Amazon Transcribe streaming offers four main types of real-time transcription: Standard, Medical, Call Analytics, and Health Scribe.
-
Standard transcriptions are the most common option. Refer to for details.
-
Medical transcriptions are tailored to medical professionals and incorporate medical terms. A common use case for this service is transcribing doctor-patient dialogue in real time, so doctors can focus on their patient instead of taking notes. Refer to for details.
-
Call Analytics transcriptions are designed for use with call center audio on two different channels; if you're looking for insight into customer service calls, use this option. Refer to for details.
-
HealthScribe transcriptions are designed to automatically create clinical notes from patient-clinician conversations using generative AI. Refer to [here] for details.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aTranscribeStreamingAsyncClient
.create()
Create aTranscribeStreamingAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.getMedicalScribeStream
(Consumer<GetMedicalScribeStreamRequest.Builder> getMedicalScribeStreamRequest) Provides details about the specified Amazon Web Services HealthScribe streaming session.getMedicalScribeStream
(GetMedicalScribeStreamRequest getMedicalScribeStreamRequest) Provides details about the specified Amazon Web Services HealthScribe streaming session.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture
<Void> startCallAnalyticsStreamTranscription
(Consumer<StartCallAnalyticsStreamTranscriptionRequest.Builder> startCallAnalyticsStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartCallAnalyticsStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.default CompletableFuture
<Void> startCallAnalyticsStreamTranscription
(StartCallAnalyticsStreamTranscriptionRequest startCallAnalyticsStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartCallAnalyticsStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.default CompletableFuture
<Void> startMedicalScribeStream
(Consumer<StartMedicalScribeStreamRequest.Builder> startMedicalScribeStreamRequest, org.reactivestreams.Publisher<MedicalScribeInputStream> requestStream, StartMedicalScribeStreamResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 stream, where audio is streamed to Amazon Web Services HealthScribe and the transcription results are streamed to your application.default CompletableFuture
<Void> startMedicalScribeStream
(StartMedicalScribeStreamRequest startMedicalScribeStreamRequest, org.reactivestreams.Publisher<MedicalScribeInputStream> requestStream, StartMedicalScribeStreamResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 stream, where audio is streamed to Amazon Web Services HealthScribe and the transcription results are streamed to your application.default CompletableFuture
<Void> startMedicalStreamTranscription
(Consumer<StartMedicalStreamTranscriptionRequest.Builder> startMedicalStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartMedicalStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe Medical and the transcription results are streamed to your application.default CompletableFuture
<Void> startMedicalStreamTranscription
(StartMedicalStreamTranscriptionRequest startMedicalStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartMedicalStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe Medical and the transcription results are streamed to your application.default CompletableFuture
<Void> startStreamTranscription
(Consumer<StartStreamTranscriptionRequest.Builder> startStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.default CompletableFuture
<Void> startStreamTranscription
(StartStreamTranscriptionRequest startStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
getMedicalScribeStream
default CompletableFuture<GetMedicalScribeStreamResponse> getMedicalScribeStream(GetMedicalScribeStreamRequest getMedicalScribeStreamRequest) Provides details about the specified Amazon Web Services HealthScribe streaming session. To view the status of the streaming session, check the
StreamStatus
field in the response. To get the details of post-stream analytics, including its status, check thePostStreamAnalyticsResult
field in the response.- Parameters:
getMedicalScribeStreamRequest
-- Returns:
- A Java Future containing the result of the GetMedicalScribeStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ResourceNotFoundException The request references a resource which doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
getMedicalScribeStream
default CompletableFuture<GetMedicalScribeStreamResponse> getMedicalScribeStream(Consumer<GetMedicalScribeStreamRequest.Builder> getMedicalScribeStreamRequest) Provides details about the specified Amazon Web Services HealthScribe streaming session. To view the status of the streaming session, check the
StreamStatus
field in the response. To get the details of post-stream analytics, including its status, check thePostStreamAnalyticsResult
field in the response.
This is a convenience which creates an instance of the
GetMedicalScribeStreamRequest.Builder
avoiding the need to create one manually viaGetMedicalScribeStreamRequest.builder()
- Parameters:
getMedicalScribeStreamRequest
- AConsumer
that will call methods onGetMedicalScribeStreamRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetMedicalScribeStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ResourceNotFoundException The request references a resource which doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
startCallAnalyticsStreamTranscription
default CompletableFuture<Void> startCallAnalyticsStreamTranscription(StartCallAnalyticsStreamTranscriptionRequest startCallAnalyticsStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartCallAnalyticsStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application. Use this operation for Call Analytics transcriptions.
The following parameters are required:
-
language-code
-
media-encoding
-
sample-rate
For more information on streaming with Amazon Transcribe, see Transcribing streaming audio.
- Parameters:
startCallAnalyticsStreamTranscriptionRequest
-- Returns:
- A Java Future containing the result of the StartCallAnalyticsStreamTranscription operation returned by
the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
startCallAnalyticsStreamTranscription
default CompletableFuture<Void> startCallAnalyticsStreamTranscription(Consumer<StartCallAnalyticsStreamTranscriptionRequest.Builder> startCallAnalyticsStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartCallAnalyticsStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application. Use this operation for Call Analytics transcriptions.
The following parameters are required:
-
language-code
-
media-encoding
-
sample-rate
For more information on streaming with Amazon Transcribe, see Transcribing streaming audio.
This is a convenience which creates an instance of the
StartCallAnalyticsStreamTranscriptionRequest.Builder
avoiding the need to create one manually viaStartCallAnalyticsStreamTranscriptionRequest.builder()
- Parameters:
startCallAnalyticsStreamTranscriptionRequest
- AConsumer
that will call methods onStartCallAnalyticsStreamTranscriptionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartCallAnalyticsStreamTranscription operation returned by
the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
startMedicalScribeStream
default CompletableFuture<Void> startMedicalScribeStream(StartMedicalScribeStreamRequest startMedicalScribeStreamRequest, org.reactivestreams.Publisher<MedicalScribeInputStream> requestStream, StartMedicalScribeStreamResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 stream, where audio is streamed to Amazon Web Services HealthScribe and the transcription results are streamed to your application.
When you start a stream, you first specify the stream configuration in a
MedicalScribeConfigurationEvent
. This event includes channel definitions, encryption settings, and post-stream analytics settings, such as the output configuration for aggregated transcript and clinical note generation. These are additional streaming session configurations beyond those provided in your initial start request headers. Whether you are starting a new session or resuming an existing session, your first event must be aMedicalScribeConfigurationEvent
.After you send a
MedicalScribeConfigurationEvent
, you startAudioEvents
and Amazon Web Services HealthScribe responds with real-time transcription results. When you are finished, to start processing the results with the post-stream analytics, send aMedicalScribeSessionControlEvent
with aType
ofEND_OF_SESSION
and Amazon Web Services HealthScribe starts the analytics.You can pause or resume streaming. To pause streaming, complete the input stream without sending the
MedicalScribeSessionControlEvent
. To resume streaming, call theStartMedicalScribeStream
and specify the same SessionId you used to start the stream.The following parameters are required:
-
language-code
-
media-encoding
-
media-sample-rate-hertz
For more information on streaming with Amazon Web Services HealthScribe, see Amazon Web Services HealthScribe.
- Parameters:
startMedicalScribeStreamRequest
-- Returns:
- A Java Future containing the result of the StartMedicalScribeStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
startMedicalScribeStream
default CompletableFuture<Void> startMedicalScribeStream(Consumer<StartMedicalScribeStreamRequest.Builder> startMedicalScribeStreamRequest, org.reactivestreams.Publisher<MedicalScribeInputStream> requestStream, StartMedicalScribeStreamResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 stream, where audio is streamed to Amazon Web Services HealthScribe and the transcription results are streamed to your application.
When you start a stream, you first specify the stream configuration in a
MedicalScribeConfigurationEvent
. This event includes channel definitions, encryption settings, and post-stream analytics settings, such as the output configuration for aggregated transcript and clinical note generation. These are additional streaming session configurations beyond those provided in your initial start request headers. Whether you are starting a new session or resuming an existing session, your first event must be aMedicalScribeConfigurationEvent
.After you send a
MedicalScribeConfigurationEvent
, you startAudioEvents
and Amazon Web Services HealthScribe responds with real-time transcription results. When you are finished, to start processing the results with the post-stream analytics, send aMedicalScribeSessionControlEvent
with aType
ofEND_OF_SESSION
and Amazon Web Services HealthScribe starts the analytics.You can pause or resume streaming. To pause streaming, complete the input stream without sending the
MedicalScribeSessionControlEvent
. To resume streaming, call theStartMedicalScribeStream
and specify the same SessionId you used to start the stream.The following parameters are required:
-
language-code
-
media-encoding
-
media-sample-rate-hertz
For more information on streaming with Amazon Web Services HealthScribe, see Amazon Web Services HealthScribe.
This is a convenience which creates an instance of the
StartMedicalScribeStreamRequest.Builder
avoiding the need to create one manually viaStartMedicalScribeStreamRequest.builder()
- Parameters:
startMedicalScribeStreamRequest
- AConsumer
that will call methods onStartMedicalScribeStreamRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartMedicalScribeStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
startMedicalStreamTranscription
default CompletableFuture<Void> startMedicalStreamTranscription(StartMedicalStreamTranscriptionRequest startMedicalStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartMedicalStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe Medical and the transcription results are streamed to your application.
The following parameters are required:
-
language-code
-
media-encoding
-
sample-rate
For more information on streaming with Amazon Transcribe Medical, see Transcribing streaming audio.
- Parameters:
startMedicalStreamTranscriptionRequest
-- Returns:
- A Java Future containing the result of the StartMedicalStreamTranscription operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
startMedicalStreamTranscription
default CompletableFuture<Void> startMedicalStreamTranscription(Consumer<StartMedicalStreamTranscriptionRequest.Builder> startMedicalStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartMedicalStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe Medical and the transcription results are streamed to your application.
The following parameters are required:
-
language-code
-
media-encoding
-
sample-rate
For more information on streaming with Amazon Transcribe Medical, see Transcribing streaming audio.
This is a convenience which creates an instance of the
StartMedicalStreamTranscriptionRequest.Builder
avoiding the need to create one manually viaStartMedicalStreamTranscriptionRequest.builder()
- Parameters:
startMedicalStreamTranscriptionRequest
- AConsumer
that will call methods onStartMedicalStreamTranscriptionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartMedicalStreamTranscription operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
startStreamTranscription
default CompletableFuture<Void> startStreamTranscription(StartStreamTranscriptionRequest startStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.
The following parameters are required:
-
language-code
oridentify-language
oridentify-multiple-language
-
media-encoding
-
sample-rate
For more information on streaming with Amazon Transcribe, see Transcribing streaming audio.
- Parameters:
startStreamTranscriptionRequest
-- Returns:
- A Java Future containing the result of the StartStreamTranscription operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
startStreamTranscription
default CompletableFuture<Void> startStreamTranscription(Consumer<StartStreamTranscriptionRequest.Builder> startStreamTranscriptionRequest, org.reactivestreams.Publisher<AudioStream> requestStream, StartStreamTranscriptionResponseHandler asyncResponseHandler) Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.
The following parameters are required:
-
language-code
oridentify-language
oridentify-multiple-language
-
media-encoding
-
sample-rate
For more information on streaming with Amazon Transcribe, see Transcribing streaming audio.
This is a convenience which creates an instance of the
StartStreamTranscriptionRequest.Builder
avoiding the need to create one manually viaStartStreamTranscriptionRequest.builder()
- Parameters:
startStreamTranscriptionRequest
- AConsumer
that will call methods onStartStreamTranscriptionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartStreamTranscription operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- BadRequestException One or more arguments to the
StartStreamTranscription
,StartMedicalStreamTranscription
, orStartCallAnalyticsStreamTranscription
operation was not valid. For example,MediaEncoding
orLanguageCode
used unsupported values. Check the specified parameters and try your request again. - LimitExceededException Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length limit. Break your audio stream into smaller chunks and try your request again.
- InternalFailureException A problem occurred while processing the audio. Amazon Transcribe terminated processing.
- ConflictException A new stream started with the same session ID. The current stream has been terminated.
- ServiceUnavailableException The service is currently unavailable. Try your request later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- TranscribeStreamingException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- BadRequestException One or more arguments to the
- See Also:
-
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aTranscribeStreamingAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aTranscribeStreamingAsyncClient
.
-