aws-sdk-transcribestreamingservice 1.73.0 → 1.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-transcribestreamingservice/async_client.rb +263 -1
- data/lib/aws-sdk-transcribestreamingservice/client.rb +55 -1
- data/lib/aws-sdk-transcribestreamingservice/client_api.rb +189 -0
- data/lib/aws-sdk-transcribestreamingservice/endpoint_provider.rb +13 -17
- data/lib/aws-sdk-transcribestreamingservice/errors.rb +16 -0
- data/lib/aws-sdk-transcribestreamingservice/event_streams.rb +231 -6
- data/lib/aws-sdk-transcribestreamingservice/types.rb +797 -2
- data/lib/aws-sdk-transcribestreamingservice.rb +2 -2
- data/sig/client.rbs +29 -0
- data/sig/errors.rbs +3 -0
- data/sig/types.rbs +147 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44657428883aaaa8ee7e9b9206258742c1b72b5ce5960d655c73674d5406f11a
|
4
|
+
data.tar.gz: 159e8e0e2c1c6fc6cec022dba323800a8a099a2761badfe06e6cd2b7ad603d33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93bcfbfc787f5d95a29dcf913ee15b66bcde716205df82e8e70886dc299a3bbd65cf0945406d76a16c07a61e6232ac404b716f4fb0e7035d734fcb55b85032b2
|
7
|
+
data.tar.gz: 62d0d0e3276556b305f9e8ad6f1f76bb0e0c8bb2865434248135c13a948d7cc1e7a8c4bbb22bf294afd935d34d24e85e29e853277b674b897edf89e493e5b443
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.75.0 (2025-02-06)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.74.0 (2025-01-29)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - This release adds support for AWS HealthScribe Streaming APIs within Amazon Transcribe.
|
13
|
+
|
4
14
|
1.73.0 (2025-01-15)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.75.0
|
@@ -821,6 +821,268 @@ module Aws::TranscribeStreamingService
|
|
821
821
|
req.send_request(options, &block)
|
822
822
|
end
|
823
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
|
+
|
824
1086
|
# Starts a bidirectional HTTP/2 or WebSocket stream where audio is
|
825
1087
|
# streamed to Amazon Transcribe Medical and the transcription results
|
826
1088
|
# are streamed to your application.
|
@@ -1788,7 +2050,7 @@ module Aws::TranscribeStreamingService
|
|
1788
2050
|
tracer: tracer
|
1789
2051
|
)
|
1790
2052
|
context[:gem_name] = 'aws-sdk-transcribestreamingservice'
|
1791
|
-
context[:gem_version] = '1.
|
2053
|
+
context[:gem_version] = '1.75.0'
|
1792
2054
|
Seahorse::Client::Request.new(handlers, context)
|
1793
2055
|
end
|
1794
2056
|
|
@@ -481,6 +481,60 @@ module Aws::TranscribeStreamingService
|
|
481
481
|
|
482
482
|
# @!group API Operations
|
483
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
|
+
|
484
538
|
# @!endgroup
|
485
539
|
|
486
540
|
# @param params ({})
|
@@ -499,7 +553,7 @@ module Aws::TranscribeStreamingService
|
|
499
553
|
tracer: tracer
|
500
554
|
)
|
501
555
|
context[:gem_name] = 'aws-sdk-transcribestreamingservice'
|
502
|
-
context[:gem_version] = '1.
|
556
|
+
context[:gem_version] = '1.75.0'
|
503
557
|
Seahorse::Client::Request.new(handlers, context)
|
504
558
|
end
|
505
559
|
|