Interface TranscribeStreamingAsyncClient

  • All Superinterfaces:
    AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

    @Generated("software.amazon.awssdk:codegen")
    @ThreadSafe
    public interface TranscribeStreamingAsyncClient
    extends AwsClient
    Service client for accessing Amazon Transcribe Streaming Service asynchronously. This can be created using the static 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.

    • Method Detail

      • 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 the PostStreamAnalyticsResult 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 the PostStreamAnalyticsResult field in the response.


        This is a convenience which creates an instance of the GetMedicalScribeStreamRequest.Builder avoiding the need to create one manually via GetMedicalScribeStreamRequest.builder()

        Parameters:
        getMedicalScribeStreamRequest - A Consumer that will call methods on GetMedicalScribeStreamRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 via StartCallAnalyticsStreamTranscriptionRequest.builder()

        Parameters:
        startCallAnalyticsStreamTranscriptionRequest - A Consumer that will call methods on StartCallAnalyticsStreamTranscriptionRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 a MedicalScribeConfigurationEvent.

        After you send a MedicalScribeConfigurationEvent, you start AudioEvents 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 a MedicalScribeSessionControlEvent with a Type of END_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 the StartMedicalScribeStream 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 a MedicalScribeConfigurationEvent.

        After you send a MedicalScribeConfigurationEvent, you start AudioEvents 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 a MedicalScribeSessionControlEvent with a Type of END_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 the StartMedicalScribeStream 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 via StartMedicalScribeStreamRequest.builder()

        Parameters:
        startMedicalScribeStreamRequest - A Consumer that will call methods on StartMedicalScribeStreamRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 via StartMedicalStreamTranscriptionRequest.builder()

        Parameters:
        startMedicalStreamTranscriptionRequest - A Consumer that will call methods on StartMedicalStreamTranscriptionRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 or identify-language or identify-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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation
      • 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 or identify-language or identify-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 via StartStreamTranscriptionRequest.builder()

        Parameters:
        startStreamTranscriptionRequest - A Consumer that will call methods on StartStreamTranscriptionRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
        • BadRequestException One or more arguments to the StartStreamTranscription, StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription operation was not valid. For example, MediaEncoding or LanguageCode 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.
        See Also:
        AWS API Documentation