aws-sdk-transcribestreamingservice 1.72.0 → 1.74.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93432358e414c1bef81b6fade6e61d20c3c521f023de57328cbe3a3b7a7dfc1b
4
- data.tar.gz: 9508cd9b7a15bb03cf19016b0771f12c40def116e3fe9e953a878a2954dd3e8e
3
+ metadata.gz: d514cccd1210098a4eecba417588f9a61e765135ac079087f48ee5c6a5d331eb
4
+ data.tar.gz: b9edcc962ba331945a18df37c4aae4bb9079691839665b28e3896802a43f31cf
5
5
  SHA512:
6
- metadata.gz: 7e763f4a939bb285c9f9b8169f75f0168515f9268d414512f7114c46bf8e945699a7a50b41b823d2ac3551c290990290c2fcfe4cfc215f7288293c522878e60f
7
- data.tar.gz: db5f127c31f3395ba168f51235b5331a2a156507d8048f65dfca5f22a8b5e55adf62ead0697a691d6ef38d19edc8f96b17e68484d77bad416718debb5d23f2c7
6
+ metadata.gz: 40ff5d374b3021c8474cf0636ad06dc77485392a26bd0e53b39575b6b2247875eca40dc3496db92d1a6f6eb0da3939a0520e05ad311471799f0369665a4b8ea8
7
+ data.tar.gz: 173e138a04581e2320bbcc7fc1a6cd5068560110ef0138e904b01aaa0b4d69a8431305b0e9cc87d844b1a54c4554ecb04f32230dcb284e64b08a8a704625f0ae
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.74.0 (2025-01-29)
5
+ ------------------
6
+
7
+ * Feature - This release adds support for AWS HealthScribe Streaming APIs within Amazon Transcribe.
8
+
9
+ 1.73.0 (2025-01-15)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
4
14
  1.72.0 (2024-10-18)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.72.0
1
+ 1.74.0
@@ -197,11 +197,34 @@ module Aws::TranscribeStreamingService
197
197
  # Used when loading credentials from the shared credentials file
198
198
  # at HOME/.aws/credentials. When not specified, 'default' is used.
199
199
  #
200
+ # @option options [String] :request_checksum_calculation ("when_supported")
201
+ # Determines when a checksum will be calculated for request payloads. Values are:
202
+ #
203
+ # * `when_supported` - (default) When set, a checksum will be
204
+ # calculated for all request payloads of operations modeled with the
205
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
206
+ # `requestAlgorithmMember` is modeled.
207
+ # * `when_required` - When set, a checksum will only be calculated for
208
+ # request payloads of operations modeled with the `httpChecksum` trait where
209
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
210
+ # is modeled and supplied.
211
+ #
200
212
  # @option options [Integer] :request_min_compression_size_bytes (10240)
201
213
  # The minimum size in bytes that triggers compression for request
202
214
  # bodies. The value must be non-negative integer value between 0
203
215
  # and 10485780 bytes inclusive.
204
216
  #
217
+ # @option options [String] :response_checksum_validation ("when_supported")
218
+ # Determines when checksum validation will be performed on response payloads. Values are:
219
+ #
220
+ # * `when_supported` - (default) When set, checksum validation is performed on all
221
+ # response payloads of operations modeled with the `httpChecksum` trait where
222
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
223
+ # are supported.
224
+ # * `when_required` - When set, checksum validation is not performed on
225
+ # response payloads of operations unless the checksum algorithm is supported and
226
+ # the `requestValidationModeMember` member is set to `ENABLED`.
227
+ #
205
228
  # @option options [Proc] :retry_backoff
206
229
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
207
230
  # This option is only used in the `legacy` retry mode.
@@ -798,6 +821,268 @@ module Aws::TranscribeStreamingService
798
821
  req.send_request(options, &block)
799
822
  end
800
823
 
824
+ # Starts a bidirectional HTTP/2 stream, where audio is streamed to
825
+ # Amazon Web Services HealthScribe and the transcription results are
826
+ # streamed to your application.
827
+ #
828
+ # When you start a stream, you first specify the stream configuration in
829
+ # a `MedicalScribeConfigurationEvent`. This event includes channel
830
+ # definitions, encryption settings, and post-stream analytics settings,
831
+ # such as the output configuration for aggregated transcript and
832
+ # clinical note generation. These are additional streaming session
833
+ # configurations beyond those provided in your initial start request
834
+ # headers. Whether you are starting a new session or resuming an
835
+ # existing session, your first event must be a
836
+ # `MedicalScribeConfigurationEvent`.
837
+ #
838
+ # After you send a `MedicalScribeConfigurationEvent`, you start
839
+ # `AudioEvents` and Amazon Web Services HealthScribe responds with
840
+ # real-time transcription results. When you are finished, to start
841
+ # processing the results with the post-stream analytics, send a
842
+ # `MedicalScribeSessionControlEvent` with a `Type` of `END_OF_SESSION`
843
+ # and Amazon Web Services HealthScribe starts the analytics.
844
+ #
845
+ # You can pause or resume streaming. To pause streaming, complete the
846
+ # input stream without sending the `MedicalScribeSessionControlEvent`.
847
+ # To resume streaming, call the `StartMedicalScribeStream` and specify
848
+ # the same SessionId you used to start the stream.
849
+ #
850
+ # The following parameters are required:
851
+ #
852
+ # * `language-code`
853
+ #
854
+ # * `media-encoding`
855
+ #
856
+ # * `media-sample-rate-hertz`
857
+ #
858
+ #
859
+ #
860
+ # For more information on streaming with Amazon Web Services
861
+ # HealthScribe, see [Amazon Web Services HealthScribe][1].
862
+ #
863
+ #
864
+ #
865
+ # [1]: https://docs.aws.amazon.com/transcribe/latest/dg/health-scribe-streaming.html
866
+ #
867
+ # @option params [String] :session_id
868
+ # Specify an identifier for your streaming session (in UUID format). If
869
+ # you don't include a SessionId in your request, Amazon Web Services
870
+ # HealthScribe generates an ID and returns it in the response.
871
+ #
872
+ # @option params [required, String] :language_code
873
+ # Specify the language code for your HealthScribe streaming session.
874
+ #
875
+ # @option params [required, Integer] :media_sample_rate_hertz
876
+ # Specify the sample rate of the input audio (in hertz). Amazon Web
877
+ # Services HealthScribe supports a range from 16,000 Hz to 48,000 Hz.
878
+ # The sample rate you specify must match that of your audio.
879
+ #
880
+ # @option params [required, String] :media_encoding
881
+ # Specify the encoding used for the input audio.
882
+ #
883
+ # Supported formats are:
884
+ #
885
+ # * FLAC
886
+ #
887
+ # * OPUS-encoded audio in an Ogg container
888
+ #
889
+ # * PCM (only signed 16-bit little-endian audio formats, which does not
890
+ # include WAV)
891
+ #
892
+ # For more information, see [Media formats][1].
893
+ #
894
+ #
895
+ #
896
+ # [1]: https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio
897
+ #
898
+ # @return [Types::StartMedicalScribeStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
899
+ #
900
+ # * {Types::StartMedicalScribeStreamResponse#session_id #session_id} => String
901
+ # * {Types::StartMedicalScribeStreamResponse#request_id #request_id} => String
902
+ # * {Types::StartMedicalScribeStreamResponse#language_code #language_code} => String
903
+ # * {Types::StartMedicalScribeStreamResponse#media_sample_rate_hertz #media_sample_rate_hertz} => Integer
904
+ # * {Types::StartMedicalScribeStreamResponse#media_encoding #media_encoding} => String
905
+ # * {Types::StartMedicalScribeStreamResponse#result_stream #result_stream} => Types::MedicalScribeResultStream
906
+ #
907
+ # @example Bi-directional EventStream Operation Example
908
+ #
909
+ # You can signal input events after the initial request is established. Events
910
+ # will be sent to the stream immediately once the stream connection is
911
+ # established successfully.
912
+ #
913
+ # To signal events, you can call the #signal methods from an Aws::TranscribeStreamingService::EventStreams::MedicalScribeInputStream
914
+ # object. You must signal events before calling #wait or #join! on the async response.
915
+ #
916
+ # input_stream = Aws::TranscribeStreamingService::EventStreams::MedicalScribeInputStream.new
917
+ #
918
+ # async_resp = client.start_medical_scribe_stream(
919
+ # # params input
920
+ # input_event_stream_handler: input_stream) do |out_stream|
921
+ #
922
+ # # register callbacks for events
923
+ # out_stream.on_transcript_event_event do |event|
924
+ # event # => Aws::TranscribeStreamingService::Types::TranscriptEvent
925
+ # end
926
+ # out_stream.on_bad_request_exception_event do |event|
927
+ # event # => Aws::TranscribeStreamingService::Types::BadRequestException
928
+ # end
929
+ # out_stream.on_limit_exceeded_exception_event do |event|
930
+ # event # => Aws::TranscribeStreamingService::Types::LimitExceededException
931
+ # end
932
+ # out_stream.on_internal_failure_exception_event do |event|
933
+ # event # => Aws::TranscribeStreamingService::Types::InternalFailureException
934
+ # end
935
+ # out_stream.on_conflict_exception_event do |event|
936
+ # event # => Aws::TranscribeStreamingService::Types::ConflictException
937
+ # end
938
+ # out_stream.on_service_unavailable_exception_event do |event|
939
+ # event # => Aws::TranscribeStreamingService::Types::ServiceUnavailableException
940
+ # end
941
+ #
942
+ # end
943
+ # # => Aws::Seahorse::Client::AsyncResponse
944
+ #
945
+ # # signal events
946
+ # input_stream.signal_audio_event_event( ... )
947
+ # input_stream.signal_session_control_event_event( ... )
948
+ # input_stream.signal_configuration_event_event( ... )
949
+ #
950
+ # # make sure to signal :end_stream at the end
951
+ # input_stream.signal_end_stream
952
+ #
953
+ # # wait until stream is closed before finalizing the sync response
954
+ # resp = async_resp.wait
955
+ # # Or close the stream and finalize sync response immediately
956
+ # # resp = async_resp.join!
957
+ #
958
+ # You can also provide an Aws::TranscribeStreamingService::EventStreams::MedicalScribeResultStream object to register callbacks
959
+ # before initializing the request instead of processing from the request block.
960
+ #
961
+ # output_stream = Aws::TranscribeStreamingService::EventStreams::MedicalScribeResultStream.new
962
+ # # register callbacks for output events
963
+ # output_stream.on_transcript_event_event do |event|
964
+ # event # => Aws::TranscribeStreamingService::Types::TranscriptEvent
965
+ # end
966
+ # output_stream.on_bad_request_exception_event do |event|
967
+ # event # => Aws::TranscribeStreamingService::Types::BadRequestException
968
+ # end
969
+ # output_stream.on_limit_exceeded_exception_event do |event|
970
+ # event # => Aws::TranscribeStreamingService::Types::LimitExceededException
971
+ # end
972
+ # output_stream.on_internal_failure_exception_event do |event|
973
+ # event # => Aws::TranscribeStreamingService::Types::InternalFailureException
974
+ # end
975
+ # output_stream.on_conflict_exception_event do |event|
976
+ # event # => Aws::TranscribeStreamingService::Types::ConflictException
977
+ # end
978
+ # output_stream.on_service_unavailable_exception_event do |event|
979
+ # event # => Aws::TranscribeStreamingService::Types::ServiceUnavailableException
980
+ # end
981
+ # output_stream.on_error_event do |event|
982
+ # # catch unmodeled error event in the stream
983
+ # raise event
984
+ # # => Aws::Errors::EventError
985
+ # # event.event_type => :error
986
+ # # event.error_code => String
987
+ # # event.error_message => String
988
+ # end
989
+ #
990
+ # async_resp = client.start_medical_scribe_stream (
991
+ # # params input
992
+ # input_event_stream_handler: input_stream
993
+ # output_event_stream_handler: output_stream
994
+ # )
995
+ #
996
+ # resp = async_resp.join!
997
+ #
998
+ # You can also iterate through events after the response is complete.
999
+ #
1000
+ # Events are available at resp.result_stream # => Enumerator
1001
+ #
1002
+ # @example Request syntax with placeholder values
1003
+ #
1004
+ # async_resp = async_client.start_medical_scribe_stream({
1005
+ # session_id: "SessionId",
1006
+ # language_code: "en-US", # required, accepts en-US
1007
+ # media_sample_rate_hertz: 1, # required
1008
+ # media_encoding: "pcm", # required, accepts pcm, ogg-opus, flac
1009
+ # input_event_stream_hander: EventStreams::MedicalScribeInputStream.new,
1010
+ # })
1011
+ # # => Seahorse::Client::AsyncResponse
1012
+ # async_resp.wait
1013
+ # # => Seahorse::Client::Response
1014
+ # # Or use async_resp.join!
1015
+ #
1016
+ # @example Response structure
1017
+ #
1018
+ # resp.session_id #=> String
1019
+ # resp.request_id #=> String
1020
+ # resp.language_code #=> String, one of "en-US"
1021
+ # resp.media_sample_rate_hertz #=> Integer
1022
+ # resp.media_encoding #=> String, one of "pcm", "ogg-opus", "flac"
1023
+ # All events are available at resp.result_stream:
1024
+ # resp.result_stream #=> Enumerator
1025
+ # resp.result_stream.event_types #=> [:transcript_event, :bad_request_exception, :limit_exceeded_exception, :internal_failure_exception, :conflict_exception, :service_unavailable_exception]
1026
+ #
1027
+ # For :transcript_event event available at #on_transcript_event_event callback and response eventstream enumerator:
1028
+ # event.transcript_segment.segment_id #=> String
1029
+ # event.transcript_segment.begin_audio_time #=> Float
1030
+ # event.transcript_segment.end_audio_time #=> Float
1031
+ # event.transcript_segment.content #=> String
1032
+ # event.transcript_segment.items #=> Array
1033
+ # event.transcript_segment.items[0].begin_audio_time #=> Float
1034
+ # event.transcript_segment.items[0].end_audio_time #=> Float
1035
+ # event.transcript_segment.items[0].type #=> String, one of "pronunciation", "punctuation"
1036
+ # event.transcript_segment.items[0].confidence #=> Float
1037
+ # event.transcript_segment.items[0].content #=> String
1038
+ # event.transcript_segment.items[0].vocabulary_filter_match #=> Boolean
1039
+ # event.transcript_segment.is_partial #=> Boolean
1040
+ # event.transcript_segment.channel_id #=> String
1041
+ #
1042
+ # For :bad_request_exception event available at #on_bad_request_exception_event callback and response eventstream enumerator:
1043
+ # event.message #=> String
1044
+ #
1045
+ # For :limit_exceeded_exception event available at #on_limit_exceeded_exception_event callback and response eventstream enumerator:
1046
+ # event.message #=> String
1047
+ #
1048
+ # For :internal_failure_exception event available at #on_internal_failure_exception_event callback and response eventstream enumerator:
1049
+ # event.message #=> String
1050
+ #
1051
+ # For :conflict_exception event available at #on_conflict_exception_event callback and response eventstream enumerator:
1052
+ # event.message #=> String
1053
+ #
1054
+ # For :service_unavailable_exception event available at #on_service_unavailable_exception_event callback and response eventstream enumerator:
1055
+ # event.message #=> String
1056
+ #
1057
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartMedicalScribeStream AWS API Documentation
1058
+ #
1059
+ # @overload start_medical_scribe_stream(params = {})
1060
+ # @param [Hash] params ({})
1061
+ def start_medical_scribe_stream(params = {}, options = {}, &block)
1062
+ params = params.dup
1063
+ input_event_stream_handler = _event_stream_handler(
1064
+ :input,
1065
+ params.delete(:input_event_stream_handler),
1066
+ EventStreams::MedicalScribeInputStream
1067
+ )
1068
+ output_event_stream_handler = _event_stream_handler(
1069
+ :output,
1070
+ params.delete(:output_event_stream_handler) || params.delete(:event_stream_handler),
1071
+ EventStreams::MedicalScribeResultStream
1072
+ )
1073
+
1074
+ yield(output_event_stream_handler) if block_given?
1075
+
1076
+ req = build_request(:start_medical_scribe_stream, params)
1077
+
1078
+ req.context[:input_event_stream_handler] = input_event_stream_handler
1079
+ req.handlers.add(Aws::Binary::EncodeHandler, priority: 55)
1080
+ req.context[:output_event_stream_handler] = output_event_stream_handler
1081
+ req.handlers.add(Aws::Binary::DecodeHandler, priority: 55)
1082
+
1083
+ req.send_request(options, &block)
1084
+ end
1085
+
801
1086
  # Starts a bidirectional HTTP/2 or WebSocket stream where audio is
802
1087
  # streamed to Amazon Transcribe Medical and the transcription results
803
1088
  # are streamed to your application.
@@ -1765,7 +2050,7 @@ module Aws::TranscribeStreamingService
1765
2050
  tracer: tracer
1766
2051
  )
1767
2052
  context[:gem_name] = 'aws-sdk-transcribestreamingservice'
1768
- context[:gem_version] = '1.72.0'
2053
+ context[:gem_version] = '1.74.0'
1769
2054
  Seahorse::Client::Request.new(handlers, context)
1770
2055
  end
1771
2056
 
@@ -268,11 +268,34 @@ module Aws::TranscribeStreamingService
268
268
  # Used when loading credentials from the shared credentials file
269
269
  # at HOME/.aws/credentials. When not specified, 'default' is used.
270
270
  #
271
+ # @option options [String] :request_checksum_calculation ("when_supported")
272
+ # Determines when a checksum will be calculated for request payloads. Values are:
273
+ #
274
+ # * `when_supported` - (default) When set, a checksum will be
275
+ # calculated for all request payloads of operations modeled with the
276
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
277
+ # `requestAlgorithmMember` is modeled.
278
+ # * `when_required` - When set, a checksum will only be calculated for
279
+ # request payloads of operations modeled with the `httpChecksum` trait where
280
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
281
+ # is modeled and supplied.
282
+ #
271
283
  # @option options [Integer] :request_min_compression_size_bytes (10240)
272
284
  # The minimum size in bytes that triggers compression for request
273
285
  # bodies. The value must be non-negative integer value between 0
274
286
  # and 10485780 bytes inclusive.
275
287
  #
288
+ # @option options [String] :response_checksum_validation ("when_supported")
289
+ # Determines when checksum validation will be performed on response payloads. Values are:
290
+ #
291
+ # * `when_supported` - (default) When set, checksum validation is performed on all
292
+ # response payloads of operations modeled with the `httpChecksum` trait where
293
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
294
+ # are supported.
295
+ # * `when_required` - When set, checksum validation is not performed on
296
+ # response payloads of operations unless the checksum algorithm is supported and
297
+ # the `requestValidationModeMember` member is set to `ENABLED`.
298
+ #
276
299
  # @option options [Proc] :retry_backoff
277
300
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
278
301
  # This option is only used in the `legacy` retry mode.
@@ -458,6 +481,60 @@ module Aws::TranscribeStreamingService
458
481
 
459
482
  # @!group API Operations
460
483
 
484
+ # Provides details about the specified Amazon Web Services HealthScribe
485
+ # streaming session. To view the status of the streaming session, check
486
+ # the `StreamStatus` field in the response. To get the details of
487
+ # post-stream analytics, including its status, check the
488
+ # `PostStreamAnalyticsResult` field in the response.
489
+ #
490
+ # @option params [required, String] :session_id
491
+ # The identifier of the HealthScribe streaming session you want
492
+ # information about.
493
+ #
494
+ # @return [Types::GetMedicalScribeStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
495
+ #
496
+ # * {Types::GetMedicalScribeStreamResponse#medical_scribe_stream_details #medical_scribe_stream_details} => Types::MedicalScribeStreamDetails
497
+ #
498
+ # @example Request syntax with placeholder values
499
+ #
500
+ # resp = client.get_medical_scribe_stream({
501
+ # session_id: "SessionId", # required
502
+ # })
503
+ #
504
+ # @example Response structure
505
+ #
506
+ # resp.medical_scribe_stream_details.session_id #=> String
507
+ # resp.medical_scribe_stream_details.stream_created_at #=> Time
508
+ # resp.medical_scribe_stream_details.stream_ended_at #=> Time
509
+ # resp.medical_scribe_stream_details.language_code #=> String, one of "en-US"
510
+ # resp.medical_scribe_stream_details.media_sample_rate_hertz #=> Integer
511
+ # resp.medical_scribe_stream_details.media_encoding #=> String, one of "pcm", "ogg-opus", "flac"
512
+ # resp.medical_scribe_stream_details.vocabulary_name #=> String
513
+ # resp.medical_scribe_stream_details.vocabulary_filter_name #=> String
514
+ # resp.medical_scribe_stream_details.vocabulary_filter_method #=> String, one of "remove", "mask", "tag"
515
+ # resp.medical_scribe_stream_details.resource_access_role_arn #=> String
516
+ # resp.medical_scribe_stream_details.channel_definitions #=> Array
517
+ # resp.medical_scribe_stream_details.channel_definitions[0].channel_id #=> Integer
518
+ # resp.medical_scribe_stream_details.channel_definitions[0].participant_role #=> String, one of "PATIENT", "CLINICIAN"
519
+ # resp.medical_scribe_stream_details.encryption_settings.kms_encryption_context #=> Hash
520
+ # resp.medical_scribe_stream_details.encryption_settings.kms_encryption_context["NonEmptyString"] #=> String
521
+ # resp.medical_scribe_stream_details.encryption_settings.kms_key_id #=> String
522
+ # resp.medical_scribe_stream_details.stream_status #=> String, one of "IN_PROGRESS", "PAUSED", "FAILED", "COMPLETED"
523
+ # resp.medical_scribe_stream_details.post_stream_analytics_settings.clinical_note_generation_settings.output_bucket_name #=> String
524
+ # resp.medical_scribe_stream_details.post_stream_analytics_result.clinical_note_generation_result.clinical_note_output_location #=> String
525
+ # resp.medical_scribe_stream_details.post_stream_analytics_result.clinical_note_generation_result.transcript_output_location #=> String
526
+ # resp.medical_scribe_stream_details.post_stream_analytics_result.clinical_note_generation_result.status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
527
+ # resp.medical_scribe_stream_details.post_stream_analytics_result.clinical_note_generation_result.failure_reason #=> String
528
+ #
529
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/GetMedicalScribeStream AWS API Documentation
530
+ #
531
+ # @overload get_medical_scribe_stream(params = {})
532
+ # @param [Hash] params ({})
533
+ def get_medical_scribe_stream(params = {}, options = {})
534
+ req = build_request(:get_medical_scribe_stream, params)
535
+ req.send_request(options)
536
+ end
537
+
461
538
  # @!endgroup
462
539
 
463
540
  # @param params ({})
@@ -476,7 +553,7 @@ module Aws::TranscribeStreamingService
476
553
  tracer: tracer
477
554
  )
478
555
  context[:gem_name] = 'aws-sdk-transcribestreamingservice'
479
- context[:gem_version] = '1.72.0'
556
+ context[:gem_version] = '1.74.0'
480
557
  Seahorse::Client::Request.new(handlers, context)
481
558
  end
482
559