aws-sdk-transcribestreamingservice 1.22.0 → 1.27.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -351,7 +351,7 @@ module Aws::TranscribeStreamingService
351
351
  params: params,
352
352
  config: config)
353
353
  context[:gem_name] = 'aws-sdk-transcribestreamingservice'
354
- context[:gem_version] = '1.22.0'
354
+ context[:gem_version] = '1.27.0'
355
355
  Seahorse::Client::Request.new(handlers, context)
356
356
  end
357
357
 
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -20,6 +20,7 @@ module Aws::TranscribeStreamingService
20
20
  AudioStream = Shapes::StructureShape.new(name: 'AudioStream')
21
21
  BadRequestException = Shapes::StructureShape.new(name: 'BadRequestException')
22
22
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
23
+ Confidence = Shapes::FloatShape.new(name: 'Confidence')
23
24
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
24
25
  Double = Shapes::FloatShape.new(name: 'Double')
25
26
  InternalFailureException = Shapes::StructureShape.new(name: 'InternalFailureException')
@@ -30,18 +31,34 @@ module Aws::TranscribeStreamingService
30
31
  LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
31
32
  MediaEncoding = Shapes::StringShape.new(name: 'MediaEncoding')
32
33
  MediaSampleRateHertz = Shapes::IntegerShape.new(name: 'MediaSampleRateHertz')
34
+ MedicalAlternative = Shapes::StructureShape.new(name: 'MedicalAlternative')
35
+ MedicalAlternativeList = Shapes::ListShape.new(name: 'MedicalAlternativeList')
36
+ MedicalContentIdentificationType = Shapes::StringShape.new(name: 'MedicalContentIdentificationType')
37
+ MedicalEntity = Shapes::StructureShape.new(name: 'MedicalEntity')
38
+ MedicalEntityList = Shapes::ListShape.new(name: 'MedicalEntityList')
39
+ MedicalItem = Shapes::StructureShape.new(name: 'MedicalItem')
40
+ MedicalItemList = Shapes::ListShape.new(name: 'MedicalItemList')
41
+ MedicalResult = Shapes::StructureShape.new(name: 'MedicalResult')
42
+ MedicalResultList = Shapes::ListShape.new(name: 'MedicalResultList')
43
+ MedicalTranscript = Shapes::StructureShape.new(name: 'MedicalTranscript')
44
+ MedicalTranscriptEvent = Shapes::StructureShape.new(name: 'MedicalTranscriptEvent')
45
+ MedicalTranscriptResultStream = Shapes::StructureShape.new(name: 'MedicalTranscriptResultStream')
33
46
  NumberOfChannels = Shapes::IntegerShape.new(name: 'NumberOfChannels')
34
47
  RequestId = Shapes::StringShape.new(name: 'RequestId')
35
48
  Result = Shapes::StructureShape.new(name: 'Result')
36
49
  ResultList = Shapes::ListShape.new(name: 'ResultList')
37
50
  ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
38
51
  SessionId = Shapes::StringShape.new(name: 'SessionId')
52
+ Specialty = Shapes::StringShape.new(name: 'Specialty')
53
+ StartMedicalStreamTranscriptionRequest = Shapes::StructureShape.new(name: 'StartMedicalStreamTranscriptionRequest')
54
+ StartMedicalStreamTranscriptionResponse = Shapes::StructureShape.new(name: 'StartMedicalStreamTranscriptionResponse')
39
55
  StartStreamTranscriptionRequest = Shapes::StructureShape.new(name: 'StartStreamTranscriptionRequest')
40
56
  StartStreamTranscriptionResponse = Shapes::StructureShape.new(name: 'StartStreamTranscriptionResponse')
41
57
  String = Shapes::StringShape.new(name: 'String')
42
58
  Transcript = Shapes::StructureShape.new(name: 'Transcript')
43
59
  TranscriptEvent = Shapes::StructureShape.new(name: 'TranscriptEvent')
44
60
  TranscriptResultStream = Shapes::StructureShape.new(name: 'TranscriptResultStream')
61
+ Type = Shapes::StringShape.new(name: 'Type')
45
62
  VocabularyFilterMethod = Shapes::StringShape.new(name: 'VocabularyFilterMethod')
46
63
  VocabularyFilterName = Shapes::StringShape.new(name: 'VocabularyFilterName')
47
64
  VocabularyName = Shapes::StringShape.new(name: 'VocabularyName')
@@ -80,6 +97,56 @@ module Aws::TranscribeStreamingService
80
97
  LimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
81
98
  LimitExceededException.struct_class = Types::LimitExceededException
82
99
 
100
+ MedicalAlternative.add_member(:transcript, Shapes::ShapeRef.new(shape: String, location_name: "Transcript"))
101
+ MedicalAlternative.add_member(:items, Shapes::ShapeRef.new(shape: MedicalItemList, location_name: "Items"))
102
+ MedicalAlternative.add_member(:entities, Shapes::ShapeRef.new(shape: MedicalEntityList, location_name: "Entities"))
103
+ MedicalAlternative.struct_class = Types::MedicalAlternative
104
+
105
+ MedicalAlternativeList.member = Shapes::ShapeRef.new(shape: MedicalAlternative)
106
+
107
+ MedicalEntity.add_member(:start_time, Shapes::ShapeRef.new(shape: Double, location_name: "StartTime"))
108
+ MedicalEntity.add_member(:end_time, Shapes::ShapeRef.new(shape: Double, location_name: "EndTime"))
109
+ MedicalEntity.add_member(:category, Shapes::ShapeRef.new(shape: String, location_name: "Category"))
110
+ MedicalEntity.add_member(:content, Shapes::ShapeRef.new(shape: String, location_name: "Content"))
111
+ MedicalEntity.add_member(:confidence, Shapes::ShapeRef.new(shape: Confidence, location_name: "Confidence"))
112
+ MedicalEntity.struct_class = Types::MedicalEntity
113
+
114
+ MedicalEntityList.member = Shapes::ShapeRef.new(shape: MedicalEntity)
115
+
116
+ MedicalItem.add_member(:start_time, Shapes::ShapeRef.new(shape: Double, location_name: "StartTime"))
117
+ MedicalItem.add_member(:end_time, Shapes::ShapeRef.new(shape: Double, location_name: "EndTime"))
118
+ MedicalItem.add_member(:type, Shapes::ShapeRef.new(shape: ItemType, location_name: "Type"))
119
+ MedicalItem.add_member(:content, Shapes::ShapeRef.new(shape: String, location_name: "Content"))
120
+ MedicalItem.add_member(:confidence, Shapes::ShapeRef.new(shape: Confidence, location_name: "Confidence"))
121
+ MedicalItem.add_member(:speaker, Shapes::ShapeRef.new(shape: String, location_name: "Speaker"))
122
+ MedicalItem.struct_class = Types::MedicalItem
123
+
124
+ MedicalItemList.member = Shapes::ShapeRef.new(shape: MedicalItem)
125
+
126
+ MedicalResult.add_member(:result_id, Shapes::ShapeRef.new(shape: String, location_name: "ResultId"))
127
+ MedicalResult.add_member(:start_time, Shapes::ShapeRef.new(shape: Double, location_name: "StartTime"))
128
+ MedicalResult.add_member(:end_time, Shapes::ShapeRef.new(shape: Double, location_name: "EndTime"))
129
+ MedicalResult.add_member(:is_partial, Shapes::ShapeRef.new(shape: Boolean, location_name: "IsPartial"))
130
+ MedicalResult.add_member(:alternatives, Shapes::ShapeRef.new(shape: MedicalAlternativeList, location_name: "Alternatives"))
131
+ MedicalResult.add_member(:channel_id, Shapes::ShapeRef.new(shape: String, location_name: "ChannelId"))
132
+ MedicalResult.struct_class = Types::MedicalResult
133
+
134
+ MedicalResultList.member = Shapes::ShapeRef.new(shape: MedicalResult)
135
+
136
+ MedicalTranscript.add_member(:results, Shapes::ShapeRef.new(shape: MedicalResultList, location_name: "Results"))
137
+ MedicalTranscript.struct_class = Types::MedicalTranscript
138
+
139
+ MedicalTranscriptEvent.add_member(:transcript, Shapes::ShapeRef.new(shape: MedicalTranscript, location_name: "Transcript"))
140
+ MedicalTranscriptEvent.struct_class = Types::MedicalTranscriptEvent
141
+
142
+ MedicalTranscriptResultStream.add_member(:transcript_event, Shapes::ShapeRef.new(shape: MedicalTranscriptEvent, event: true, location_name: "TranscriptEvent"))
143
+ MedicalTranscriptResultStream.add_member(:bad_request_exception, Shapes::ShapeRef.new(shape: BadRequestException, event: true, location_name: "BadRequestException"))
144
+ MedicalTranscriptResultStream.add_member(:limit_exceeded_exception, Shapes::ShapeRef.new(shape: LimitExceededException, event: true, location_name: "LimitExceededException"))
145
+ MedicalTranscriptResultStream.add_member(:internal_failure_exception, Shapes::ShapeRef.new(shape: InternalFailureException, event: true, location_name: "InternalFailureException"))
146
+ MedicalTranscriptResultStream.add_member(:conflict_exception, Shapes::ShapeRef.new(shape: ConflictException, event: true, location_name: "ConflictException"))
147
+ MedicalTranscriptResultStream.add_member(:service_unavailable_exception, Shapes::ShapeRef.new(shape: ServiceUnavailableException, event: true, location_name: "ServiceUnavailableException"))
148
+ MedicalTranscriptResultStream.struct_class = Types::MedicalTranscriptResultStream
149
+
83
150
  Result.add_member(:result_id, Shapes::ShapeRef.new(shape: String, location_name: "ResultId"))
84
151
  Result.add_member(:start_time, Shapes::ShapeRef.new(shape: Double, location_name: "StartTime"))
85
152
  Result.add_member(:end_time, Shapes::ShapeRef.new(shape: Double, location_name: "EndTime"))
@@ -93,6 +160,39 @@ module Aws::TranscribeStreamingService
93
160
  ServiceUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
94
161
  ServiceUnavailableException.struct_class = Types::ServiceUnavailableException
95
162
 
163
+ StartMedicalStreamTranscriptionRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location: "header", location_name: "x-amzn-transcribe-language-code"))
164
+ StartMedicalStreamTranscriptionRequest.add_member(:media_sample_rate_hertz, Shapes::ShapeRef.new(shape: MediaSampleRateHertz, required: true, location: "header", location_name: "x-amzn-transcribe-sample-rate"))
165
+ StartMedicalStreamTranscriptionRequest.add_member(:media_encoding, Shapes::ShapeRef.new(shape: MediaEncoding, required: true, location: "header", location_name: "x-amzn-transcribe-media-encoding"))
166
+ StartMedicalStreamTranscriptionRequest.add_member(:vocabulary_name, Shapes::ShapeRef.new(shape: VocabularyName, location: "header", location_name: "x-amzn-transcribe-vocabulary-name"))
167
+ StartMedicalStreamTranscriptionRequest.add_member(:specialty, Shapes::ShapeRef.new(shape: Specialty, required: true, location: "header", location_name: "x-amzn-transcribe-specialty"))
168
+ StartMedicalStreamTranscriptionRequest.add_member(:type, Shapes::ShapeRef.new(shape: Type, required: true, location: "header", location_name: "x-amzn-transcribe-type"))
169
+ StartMedicalStreamTranscriptionRequest.add_member(:show_speaker_label, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-show-speaker-label"))
170
+ StartMedicalStreamTranscriptionRequest.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, location: "header", location_name: "x-amzn-transcribe-session-id"))
171
+ StartMedicalStreamTranscriptionRequest.add_member(:audio_stream, Shapes::ShapeRef.new(shape: AudioStream, required: true, eventstream: true, location_name: "AudioStream"))
172
+ StartMedicalStreamTranscriptionRequest.add_member(:enable_channel_identification, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-enable-channel-identification"))
173
+ StartMedicalStreamTranscriptionRequest.add_member(:number_of_channels, Shapes::ShapeRef.new(shape: NumberOfChannels, location: "header", location_name: "x-amzn-transcribe-number-of-channels"))
174
+ StartMedicalStreamTranscriptionRequest.add_member(:content_identification_type, Shapes::ShapeRef.new(shape: MedicalContentIdentificationType, location: "header", location_name: "x-amzn-transcribe-content-identification-type"))
175
+ StartMedicalStreamTranscriptionRequest.struct_class = Types::StartMedicalStreamTranscriptionRequest
176
+ StartMedicalStreamTranscriptionRequest[:payload] = :audio_stream
177
+ StartMedicalStreamTranscriptionRequest[:payload_member] = StartMedicalStreamTranscriptionRequest.member(:audio_stream)
178
+
179
+ StartMedicalStreamTranscriptionResponse.add_member(:request_id, Shapes::ShapeRef.new(shape: RequestId, location: "header", location_name: "x-amzn-request-id"))
180
+ StartMedicalStreamTranscriptionResponse.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, location: "header", location_name: "x-amzn-transcribe-language-code"))
181
+ StartMedicalStreamTranscriptionResponse.add_member(:media_sample_rate_hertz, Shapes::ShapeRef.new(shape: MediaSampleRateHertz, location: "header", location_name: "x-amzn-transcribe-sample-rate"))
182
+ StartMedicalStreamTranscriptionResponse.add_member(:media_encoding, Shapes::ShapeRef.new(shape: MediaEncoding, location: "header", location_name: "x-amzn-transcribe-media-encoding"))
183
+ StartMedicalStreamTranscriptionResponse.add_member(:vocabulary_name, Shapes::ShapeRef.new(shape: VocabularyName, location: "header", location_name: "x-amzn-transcribe-vocabulary-name"))
184
+ StartMedicalStreamTranscriptionResponse.add_member(:specialty, Shapes::ShapeRef.new(shape: Specialty, location: "header", location_name: "x-amzn-transcribe-specialty"))
185
+ StartMedicalStreamTranscriptionResponse.add_member(:type, Shapes::ShapeRef.new(shape: Type, location: "header", location_name: "x-amzn-transcribe-type"))
186
+ StartMedicalStreamTranscriptionResponse.add_member(:show_speaker_label, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-show-speaker-label"))
187
+ StartMedicalStreamTranscriptionResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, location: "header", location_name: "x-amzn-transcribe-session-id"))
188
+ StartMedicalStreamTranscriptionResponse.add_member(:transcript_result_stream, Shapes::ShapeRef.new(shape: MedicalTranscriptResultStream, eventstream: true, location_name: "TranscriptResultStream"))
189
+ StartMedicalStreamTranscriptionResponse.add_member(:enable_channel_identification, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-enable-channel-identification"))
190
+ StartMedicalStreamTranscriptionResponse.add_member(:number_of_channels, Shapes::ShapeRef.new(shape: NumberOfChannels, location: "header", location_name: "x-amzn-transcribe-number-of-channels"))
191
+ StartMedicalStreamTranscriptionResponse.add_member(:content_identification_type, Shapes::ShapeRef.new(shape: MedicalContentIdentificationType, location: "header", location_name: "x-amzn-transcribe-content-identification-type"))
192
+ StartMedicalStreamTranscriptionResponse.struct_class = Types::StartMedicalStreamTranscriptionResponse
193
+ StartMedicalStreamTranscriptionResponse[:payload] = :transcript_result_stream
194
+ StartMedicalStreamTranscriptionResponse[:payload_member] = StartMedicalStreamTranscriptionResponse.member(:transcript_result_stream)
195
+
96
196
  StartStreamTranscriptionRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location: "header", location_name: "x-amzn-transcribe-language-code"))
97
197
  StartStreamTranscriptionRequest.add_member(:media_sample_rate_hertz, Shapes::ShapeRef.new(shape: MediaSampleRateHertz, required: true, location: "header", location_name: "x-amzn-transcribe-sample-rate"))
98
198
  StartStreamTranscriptionRequest.add_member(:media_encoding, Shapes::ShapeRef.new(shape: MediaEncoding, required: true, location: "header", location_name: "x-amzn-transcribe-media-encoding"))
@@ -156,6 +256,20 @@ module Aws::TranscribeStreamingService
156
256
  "uid" => "transcribe-streaming-2017-10-26",
157
257
  }
158
258
 
259
+ api.add_operation(:start_medical_stream_transcription, Seahorse::Model::Operation.new.tap do |o|
260
+ o.name = "StartMedicalStreamTranscription"
261
+ o.http_method = "POST"
262
+ o.http_request_uri = "/medical-stream-transcription"
263
+ o.input = Shapes::ShapeRef.new(shape: StartMedicalStreamTranscriptionRequest)
264
+ o.output = Shapes::ShapeRef.new(shape: StartMedicalStreamTranscriptionResponse)
265
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
266
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
267
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
268
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
269
+ o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
270
+ o.async = true
271
+ end)
272
+
159
273
  api.add_operation(:start_stream_transcription, Seahorse::Model::Operation.new.tap do |o|
160
274
  o.name = "StartStreamTranscription"
161
275
  o.http_method = "POST"
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -17,7 +17,7 @@ module Aws::TranscribeStreamingService
17
17
 
18
18
  # @option params [String, StringIO, File] :audio_chunk
19
19
  # An audio blob that contains the next part of the audio that you want
20
- # to transcribe.
20
+ # to transcribe. The maximum audio chunk size is 32 KB.
21
21
  #
22
22
  def signal_audio_event_event(params = {})
23
23
  @event_emitter.emit(:audio_event, params)
@@ -33,6 +33,89 @@ module Aws::TranscribeStreamingService
33
33
 
34
34
  end
35
35
 
36
+ class AudioStream
37
+
38
+ def initialize
39
+ @event_emitter = Aws::EventEmitter.new
40
+ end
41
+
42
+ # @option params [String, StringIO, File] :audio_chunk
43
+ # An audio blob that contains the next part of the audio that you want
44
+ # to transcribe. The maximum audio chunk size is 32 KB.
45
+ #
46
+ def signal_audio_event_event(params = {})
47
+ @event_emitter.emit(:audio_event, params)
48
+ end
49
+
50
+ def signal_end_stream
51
+ @event_emitter.emit(:end_stream, {})
52
+ end
53
+
54
+ # @api private
55
+ # @return Aws::EventEmitter
56
+ attr_reader :event_emitter
57
+
58
+ end
59
+
60
+ class MedicalTranscriptResultStream
61
+
62
+ def initialize
63
+ @event_emitter = Aws::EventEmitter.new
64
+ end
65
+
66
+ def on_transcript_event_event(&block)
67
+ @event_emitter.on(:transcript_event, block) if block_given?
68
+ end
69
+
70
+ def on_bad_request_exception_event(&block)
71
+ @event_emitter.on(:bad_request_exception, block) if block_given?
72
+ end
73
+
74
+ def on_limit_exceeded_exception_event(&block)
75
+ @event_emitter.on(:limit_exceeded_exception, block) if block_given?
76
+ end
77
+
78
+ def on_internal_failure_exception_event(&block)
79
+ @event_emitter.on(:internal_failure_exception, block) if block_given?
80
+ end
81
+
82
+ def on_conflict_exception_event(&block)
83
+ @event_emitter.on(:conflict_exception, block) if block_given?
84
+ end
85
+
86
+ def on_service_unavailable_exception_event(&block)
87
+ @event_emitter.on(:service_unavailable_exception, block) if block_given?
88
+ end
89
+
90
+ def on_error_event(&block)
91
+ @event_emitter.on(:error, block) if block_given?
92
+ end
93
+
94
+ def on_initial_response_event(&block)
95
+ @event_emitter.on(:initial_response, block) if block_given?
96
+ end
97
+
98
+ def on_unknown_event(&block)
99
+ @event_emitter.on(:unknown_event, block) if block_given?
100
+ end
101
+
102
+ def on_event(&block)
103
+ on_transcript_event_event(&block)
104
+ on_bad_request_exception_event(&block)
105
+ on_limit_exceeded_exception_event(&block)
106
+ on_internal_failure_exception_event(&block)
107
+ on_conflict_exception_event(&block)
108
+ on_service_unavailable_exception_event(&block)
109
+ on_error_event(&block)
110
+ on_initial_response_event(&block)
111
+ on_unknown_event(&block)
112
+ end
113
+
114
+ # @api private
115
+ # @return Aws::EventEmitter
116
+ attr_reader :event_emitter
117
+
118
+ end
36
119
  class TranscriptResultStream
37
120
 
38
121
  def initialize
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -40,7 +40,7 @@ module Aws::TranscribeStreamingService
40
40
  #
41
41
  # @!attribute [rw] audio_chunk
42
42
  # An audio blob that contains the next part of the audio that you want
43
- # to transcribe.
43
+ # to transcribe. The maximum audio chunk size is 32 KB.
44
44
  # @return [String]
45
45
  #
46
46
  # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/AudioEvent AWS API Documentation
@@ -52,10 +52,11 @@ module Aws::TranscribeStreamingService
52
52
  include Aws::Structure
53
53
  end
54
54
 
55
- # One or more arguments to the `StartStreamTranscription` operation was
56
- # invalid. For example, `MediaEncoding` was not set to `pcm` or
57
- # `LanguageCode` was not set to a valid code. Check the parameters and
58
- # try your request again.
55
+ # One or more arguments to the `StartStreamTranscription` or
56
+ # `StartMedicalStreamTranscription` operation was invalid. For example,
57
+ # `MediaEncoding` was not set to a valid encoding, or `LanguageCode` was
58
+ # not set to a valid code. Check the parameters and try your request
59
+ # again.
59
60
  #
60
61
  # @!attribute [rw] message
61
62
  # @return [String]
@@ -84,8 +85,9 @@ module Aws::TranscribeStreamingService
84
85
  include Aws::Structure
85
86
  end
86
87
 
87
- # A problem occurred while processing the audio. Amazon Transcribe
88
- # terminated processing. Try your request again.
88
+ # A problem occurred while processing the audio. Amazon Transcribe or
89
+ # Amazon Transcribe Medical terminated processing. Try your request
90
+ # again.
89
91
  #
90
92
  # @!attribute [rw] message
91
93
  # @return [String]
@@ -163,6 +165,208 @@ module Aws::TranscribeStreamingService
163
165
  include Aws::Structure
164
166
  end
165
167
 
168
+ # A list of possible transcriptions for the audio.
169
+ #
170
+ # @!attribute [rw] transcript
171
+ # The text that was transcribed from the audio.
172
+ # @return [String]
173
+ #
174
+ # @!attribute [rw] items
175
+ # A list of objects that contains words and punctuation marks that
176
+ # represents one or more interpretations of the input audio.
177
+ # @return [Array<Types::MedicalItem>]
178
+ #
179
+ # @!attribute [rw] entities
180
+ # Contains the medical entities identified as personal health
181
+ # information in the transcription output.
182
+ # @return [Array<Types::MedicalEntity>]
183
+ #
184
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/MedicalAlternative AWS API Documentation
185
+ #
186
+ class MedicalAlternative < Struct.new(
187
+ :transcript,
188
+ :items,
189
+ :entities)
190
+ SENSITIVE = []
191
+ include Aws::Structure
192
+ end
193
+
194
+ # The medical entity identified as personal health information.
195
+ #
196
+ # @!attribute [rw] start_time
197
+ # The start time of the speech that was identified as a medical
198
+ # entity.
199
+ # @return [Float]
200
+ #
201
+ # @!attribute [rw] end_time
202
+ # The end time of the speech that was identified as a medical entity.
203
+ # @return [Float]
204
+ #
205
+ # @!attribute [rw] category
206
+ # The type of personal health information of the medical entity.
207
+ # @return [String]
208
+ #
209
+ # @!attribute [rw] content
210
+ # The word or words in the transcription output that have been
211
+ # identified as a medical entity.
212
+ # @return [String]
213
+ #
214
+ # @!attribute [rw] confidence
215
+ # A value between zero and one that Amazon Transcribe Medical assigned
216
+ # to the personal health information that it identified in the source
217
+ # audio. Larger values indicate that Amazon Transcribe Medical has
218
+ # higher confidence in the personal health information that it
219
+ # identified.
220
+ # @return [Float]
221
+ #
222
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/MedicalEntity AWS API Documentation
223
+ #
224
+ class MedicalEntity < Struct.new(
225
+ :start_time,
226
+ :end_time,
227
+ :category,
228
+ :content,
229
+ :confidence)
230
+ SENSITIVE = []
231
+ include Aws::Structure
232
+ end
233
+
234
+ # A word or punctuation that is transcribed from the input audio.
235
+ #
236
+ # @!attribute [rw] start_time
237
+ # The number of seconds into an audio stream that indicates the
238
+ # creation time of an item.
239
+ # @return [Float]
240
+ #
241
+ # @!attribute [rw] end_time
242
+ # The number of seconds into an audio stream that indicates the
243
+ # creation time of an item.
244
+ # @return [Float]
245
+ #
246
+ # @!attribute [rw] type
247
+ # The type of the item. `PRONUNCIATION` indicates that the item is a
248
+ # word that was recognized in the input audio. `PUNCTUATION` indicates
249
+ # that the item was interpreted as a pause in the input audio, such as
250
+ # a period to indicate the end of a sentence.
251
+ # @return [String]
252
+ #
253
+ # @!attribute [rw] content
254
+ # The word or punctuation mark that was recognized in the input audio.
255
+ # @return [String]
256
+ #
257
+ # @!attribute [rw] confidence
258
+ # A value between 0 and 1 for an item that is a confidence score that
259
+ # Amazon Transcribe Medical assigns to each word that it transcribes.
260
+ # @return [Float]
261
+ #
262
+ # @!attribute [rw] speaker
263
+ # If speaker identification is enabled, shows the integer values that
264
+ # correspond to the different speakers identified in the stream. For
265
+ # example, if the value of `Speaker` in the stream is either a `0` or
266
+ # a `1`, that indicates that Amazon Transcribe Medical has identified
267
+ # two speakers in the stream. The value of `0` corresponds to one
268
+ # speaker and the value of `1` corresponds to the other speaker.
269
+ # @return [String]
270
+ #
271
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/MedicalItem AWS API Documentation
272
+ #
273
+ class MedicalItem < Struct.new(
274
+ :start_time,
275
+ :end_time,
276
+ :type,
277
+ :content,
278
+ :confidence,
279
+ :speaker)
280
+ SENSITIVE = []
281
+ include Aws::Structure
282
+ end
283
+
284
+ # The results of transcribing a portion of the input audio stream.
285
+ #
286
+ # @!attribute [rw] result_id
287
+ # A unique identifier for the result.
288
+ # @return [String]
289
+ #
290
+ # @!attribute [rw] start_time
291
+ # The time, in seconds, from the beginning of the audio stream to the
292
+ # beginning of the result.
293
+ # @return [Float]
294
+ #
295
+ # @!attribute [rw] end_time
296
+ # The time, in seconds, from the beginning of the audio stream to the
297
+ # end of the result.
298
+ # @return [Float]
299
+ #
300
+ # @!attribute [rw] is_partial
301
+ # Amazon Transcribe Medical divides the incoming audio stream into
302
+ # segments at natural points in the audio. Transcription results are
303
+ # returned based on these segments.
304
+ #
305
+ # The `IsPartial` field is `true` to indicate that Amazon Transcribe
306
+ # Medical has additional transcription data to send. The `IsPartial`
307
+ # field is `false` to indicate that this is the last transcription
308
+ # result for the segment.
309
+ # @return [Boolean]
310
+ #
311
+ # @!attribute [rw] alternatives
312
+ # A list of possible transcriptions of the audio. Each alternative
313
+ # typically contains one `Item` that contains the result of the
314
+ # transcription.
315
+ # @return [Array<Types::MedicalAlternative>]
316
+ #
317
+ # @!attribute [rw] channel_id
318
+ # When channel identification is enabled, Amazon Transcribe Medical
319
+ # transcribes the speech from each audio channel separately.
320
+ #
321
+ # You can use `ChannelId` to retrieve the transcription results for a
322
+ # single channel in your audio stream.
323
+ # @return [String]
324
+ #
325
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/MedicalResult AWS API Documentation
326
+ #
327
+ class MedicalResult < Struct.new(
328
+ :result_id,
329
+ :start_time,
330
+ :end_time,
331
+ :is_partial,
332
+ :alternatives,
333
+ :channel_id)
334
+ SENSITIVE = []
335
+ include Aws::Structure
336
+ end
337
+
338
+ # The medical transcript in a MedicalTranscriptEvent.
339
+ #
340
+ # @!attribute [rw] results
341
+ # MedicalResult objects that contain the results of transcribing a
342
+ # portion of the input audio stream. The array can be empty.
343
+ # @return [Array<Types::MedicalResult>]
344
+ #
345
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/MedicalTranscript AWS API Documentation
346
+ #
347
+ class MedicalTranscript < Struct.new(
348
+ :results)
349
+ SENSITIVE = []
350
+ include Aws::Structure
351
+ end
352
+
353
+ # Represents a set of transcription results from the server to the
354
+ # client. It contains one or more segments of the transcription.
355
+ #
356
+ # @!attribute [rw] transcript
357
+ # The transcription of the audio stream. The transcription is composed
358
+ # of all of the items in the results list.
359
+ # @return [Types::MedicalTranscript]
360
+ #
361
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/MedicalTranscriptEvent AWS API Documentation
362
+ #
363
+ class MedicalTranscriptEvent < Struct.new(
364
+ :transcript,
365
+ :event_type)
366
+ SENSITIVE = []
367
+ include Aws::Structure
368
+ end
369
+
166
370
  # The result of transcribing a portion of the input audio stream.
167
371
  #
168
372
  # @!attribute [rw] result_id
@@ -230,13 +434,195 @@ module Aws::TranscribeStreamingService
230
434
  include Aws::Structure
231
435
  end
232
436
 
437
+ # @note When making an API call, you may pass StartMedicalStreamTranscriptionRequest
438
+ # data as a hash:
439
+ #
440
+ # {
441
+ # language_code: "en-US", # required, accepts en-US, en-GB, es-US, fr-CA, fr-FR, en-AU, it-IT, de-DE, pt-BR, ja-JP, ko-KR
442
+ # media_sample_rate_hertz: 1, # required
443
+ # media_encoding: "pcm", # required, accepts pcm, ogg-opus, flac
444
+ # vocabulary_name: "VocabularyName",
445
+ # specialty: "PRIMARYCARE", # required, accepts PRIMARYCARE, CARDIOLOGY, NEUROLOGY, ONCOLOGY, RADIOLOGY, UROLOGY
446
+ # type: "CONVERSATION", # required, accepts CONVERSATION, DICTATION
447
+ # show_speaker_label: false,
448
+ # session_id: "SessionId",
449
+ # input_event_stream_hander: EventStreams::AudioStream.new,
450
+ # enable_channel_identification: false,
451
+ # number_of_channels: 1,
452
+ # content_identification_type: "PHI", # accepts PHI
453
+ # }
454
+ #
455
+ # @!attribute [rw] language_code
456
+ # Indicates the source language used in the input audio stream. For
457
+ # Amazon Transcribe Medical, this is US English (en-US).
458
+ # @return [String]
459
+ #
460
+ # @!attribute [rw] media_sample_rate_hertz
461
+ # The sample rate of the input audio in Hertz. Sample rates of 16000
462
+ # Hz or higher are accepted.
463
+ # @return [Integer]
464
+ #
465
+ # @!attribute [rw] media_encoding
466
+ # The encoding used for the input audio.
467
+ # @return [String]
468
+ #
469
+ # @!attribute [rw] vocabulary_name
470
+ # The name of the medical custom vocabulary to use when processing the
471
+ # real-time stream.
472
+ # @return [String]
473
+ #
474
+ # @!attribute [rw] specialty
475
+ # The medical specialty of the clinician or provider.
476
+ # @return [String]
477
+ #
478
+ # @!attribute [rw] type
479
+ # The type of input audio. Choose `DICTATION` for a provider dictating
480
+ # patient notes. Choose `CONVERSATION` for a dialogue between a
481
+ # patient and one or more medical professionanls.
482
+ # @return [String]
483
+ #
484
+ # @!attribute [rw] show_speaker_label
485
+ # When `true`, enables speaker identification in your real-time
486
+ # stream.
487
+ # @return [Boolean]
488
+ #
489
+ # @!attribute [rw] session_id
490
+ # Optional. An identifier for the transcription session. If you don't
491
+ # provide a session ID, Amazon Transcribe generates one for you and
492
+ # returns it in the response.
493
+ # @return [String]
494
+ #
495
+ # @!attribute [rw] audio_stream
496
+ # Represents the audio stream from your application to Amazon
497
+ # Transcribe.
498
+ # @return [Types::AudioStream]
499
+ #
500
+ # @!attribute [rw] enable_channel_identification
501
+ # When `true`, instructs Amazon Transcribe Medical to process each
502
+ # audio channel separately and then merge the transcription output of
503
+ # each channel into a single transcription.
504
+ #
505
+ # Amazon Transcribe Medical also produces a transcription of each
506
+ # item. An item includes the start time, end time, and any alternative
507
+ # transcriptions.
508
+ #
509
+ # You can't set both `ShowSpeakerLabel` and
510
+ # `EnableChannelIdentification` in the same request. If you set both,
511
+ # your request returns a `BadRequestException`.
512
+ # @return [Boolean]
513
+ #
514
+ # @!attribute [rw] number_of_channels
515
+ # The number of channels that are in your audio stream.
516
+ # @return [Integer]
517
+ #
518
+ # @!attribute [rw] content_identification_type
519
+ # Set this field to `PHI` to identify personal health information in
520
+ # the transcription output.
521
+ # @return [String]
522
+ #
523
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartMedicalStreamTranscriptionRequest AWS API Documentation
524
+ #
525
+ class StartMedicalStreamTranscriptionRequest < Struct.new(
526
+ :language_code,
527
+ :media_sample_rate_hertz,
528
+ :media_encoding,
529
+ :vocabulary_name,
530
+ :specialty,
531
+ :type,
532
+ :show_speaker_label,
533
+ :session_id,
534
+ :audio_stream,
535
+ :enable_channel_identification,
536
+ :number_of_channels,
537
+ :content_identification_type)
538
+ SENSITIVE = []
539
+ include Aws::Structure
540
+ end
541
+
542
+ # @!attribute [rw] request_id
543
+ # An identifier for the streaming transcription.
544
+ # @return [String]
545
+ #
546
+ # @!attribute [rw] language_code
547
+ # The language code for the response transcript. For Amazon Transcribe
548
+ # Medical, this is US English (en-US).
549
+ # @return [String]
550
+ #
551
+ # @!attribute [rw] media_sample_rate_hertz
552
+ # The sample rate of the input audio in Hertz. Valid value: 16000 Hz.
553
+ # @return [Integer]
554
+ #
555
+ # @!attribute [rw] media_encoding
556
+ # The encoding used for the input audio stream.
557
+ # @return [String]
558
+ #
559
+ # @!attribute [rw] vocabulary_name
560
+ # The name of the vocabulary used when processing the stream.
561
+ # @return [String]
562
+ #
563
+ # @!attribute [rw] specialty
564
+ # The specialty in the medical domain.
565
+ # @return [String]
566
+ #
567
+ # @!attribute [rw] type
568
+ # The type of audio that was transcribed.
569
+ # @return [String]
570
+ #
571
+ # @!attribute [rw] show_speaker_label
572
+ # Shows whether speaker identification was enabled in the stream.
573
+ # @return [Boolean]
574
+ #
575
+ # @!attribute [rw] session_id
576
+ # Optional. An identifier for the transcription session. If you don't
577
+ # provide a session ID, Amazon Transcribe generates one for you and
578
+ # returns it in the response.
579
+ # @return [String]
580
+ #
581
+ # @!attribute [rw] transcript_result_stream
582
+ # Represents the stream of transcription events from Amazon Transcribe
583
+ # Medical to your application.
584
+ # @return [Types::MedicalTranscriptResultStream]
585
+ #
586
+ # @!attribute [rw] enable_channel_identification
587
+ # Shows whether channel identification has been enabled in the stream.
588
+ # @return [Boolean]
589
+ #
590
+ # @!attribute [rw] number_of_channels
591
+ # The number of channels identified in the stream.
592
+ # @return [Integer]
593
+ #
594
+ # @!attribute [rw] content_identification_type
595
+ # If the value is `PHI`, indicates that you've configured your stream
596
+ # to identify personal health information.
597
+ # @return [String]
598
+ #
599
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartMedicalStreamTranscriptionResponse AWS API Documentation
600
+ #
601
+ class StartMedicalStreamTranscriptionResponse < Struct.new(
602
+ :request_id,
603
+ :language_code,
604
+ :media_sample_rate_hertz,
605
+ :media_encoding,
606
+ :vocabulary_name,
607
+ :specialty,
608
+ :type,
609
+ :show_speaker_label,
610
+ :session_id,
611
+ :transcript_result_stream,
612
+ :enable_channel_identification,
613
+ :number_of_channels,
614
+ :content_identification_type)
615
+ SENSITIVE = []
616
+ include Aws::Structure
617
+ end
618
+
233
619
  # @note When making an API call, you may pass StartStreamTranscriptionRequest
234
620
  # data as a hash:
235
621
  #
236
622
  # {
237
- # language_code: "en-US", # required, accepts en-US, en-GB, es-US, fr-CA, fr-FR, en-AU
623
+ # language_code: "en-US", # required, accepts en-US, en-GB, es-US, fr-CA, fr-FR, en-AU, it-IT, de-DE, pt-BR, ja-JP, ko-KR
238
624
  # media_sample_rate_hertz: 1, # required
239
- # media_encoding: "pcm", # required, accepts pcm
625
+ # media_encoding: "pcm", # required, accepts pcm, ogg-opus, flac
240
626
  # vocabulary_name: "VocabularyName",
241
627
  # session_id: "SessionId",
242
628
  # input_event_stream_hander: EventStreams::AudioStream.new,
@@ -258,8 +644,7 @@ module Aws::TranscribeStreamingService
258
644
  # @return [Integer]
259
645
  #
260
646
  # @!attribute [rw] media_encoding
261
- # The encoding used for the input audio. `pcm` is the only valid
262
- # value.
647
+ # The encoding used for the input audio.
263
648
  # @return [String]
264
649
  #
265
650
  # @!attribute [rw] vocabulary_name
@@ -463,6 +848,29 @@ module Aws::TranscribeStreamingService
463
848
 
464
849
  end
465
850
 
851
+ # Represents the transcription result stream from Amazon Transcribe
852
+ # Medical to your application.
853
+ #
854
+ # EventStream is an Enumerator of Events.
855
+ # #event_types #=> Array, returns all modeled event types in the stream
856
+ #
857
+ # @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/MedicalTranscriptResultStream AWS API Documentation
858
+ #
859
+ class MedicalTranscriptResultStream < Enumerator
860
+
861
+ def event_types
862
+ [
863
+ :transcript_event,
864
+ :bad_request_exception,
865
+ :limit_exceeded_exception,
866
+ :internal_failure_exception,
867
+ :conflict_exception,
868
+ :service_unavailable_exception
869
+ ]
870
+ end
871
+
872
+ end
873
+
466
874
  # Represents the transcription result stream from Amazon Transcribe to
467
875
  # your application.
468
876
  #