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