aws-sdk-transcribestreamingservice 1.20.0 → 1.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-transcribestreamingservice.rb +2 -2
- data/lib/aws-sdk-transcribestreamingservice/async_client.rb +298 -6
- data/lib/aws-sdk-transcribestreamingservice/client.rb +1 -1
- data/lib/aws-sdk-transcribestreamingservice/client_api.rb +120 -0
- data/lib/aws-sdk-transcribestreamingservice/event_streams.rb +84 -1
- data/lib/aws-sdk-transcribestreamingservice/types.rb +463 -14
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65a88e82e6996f69636c992468625d2bfa4861251d435af79e702c3a724dccdd
|
4
|
+
data.tar.gz: e2de51ecfef9467978824db98d5d7a340f8bf209f3ac7b0eb172d1ff8bb02b83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae7fac5034c8d444a60f653f4cbbf3ce92b6925f19087f0c8497c6d687570494c77c31ec0be057e884eadb5bf8b271902c6559df3791ccff4ccf8ffb8c99502b
|
7
|
+
data.tar.gz: 4102606c3a4231c1c1743404a6ae9085c3fe31b02846af11119f844987ac98f5f33448f9fea7555ebba6e7e96073c42f7af3ec0561cf431984dd2ebd235446fb
|
@@ -30,7 +30,7 @@ require_relative 'aws-sdk-transcribestreamingservice/event_streams'
|
|
30
30
|
# structure.
|
31
31
|
#
|
32
32
|
# transcribe_streaming_service = Aws::TranscribeStreamingService::Client.new
|
33
|
-
# resp = transcribe_streaming_service.
|
33
|
+
# resp = transcribe_streaming_service.start_medical_stream_transcription(params)
|
34
34
|
#
|
35
35
|
# See {Client} for more information.
|
36
36
|
#
|
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-transcribestreamingservice/event_streams'
|
|
50
50
|
# @!group service
|
51
51
|
module Aws::TranscribeStreamingService
|
52
52
|
|
53
|
-
GEM_VERSION = '1.
|
53
|
+
GEM_VERSION = '1.25.0'
|
54
54
|
|
55
55
|
end
|
@@ -237,6 +237,276 @@ module Aws::TranscribeStreamingService
|
|
237
237
|
|
238
238
|
# @!group API Operations
|
239
239
|
|
240
|
+
# Starts a bidirectional HTTP/2 stream where audio is streamed to Amazon
|
241
|
+
# Transcribe Medical and the transcription results are streamed to your
|
242
|
+
# application.
|
243
|
+
#
|
244
|
+
# @option params [required, String] :language_code
|
245
|
+
# Indicates the source language used in the input audio stream. For
|
246
|
+
# Amazon Transcribe Medical, this is US English (en-US).
|
247
|
+
#
|
248
|
+
# @option params [required, Integer] :media_sample_rate_hertz
|
249
|
+
# The sample rate of the input audio in Hertz. Sample rates of 16000 Hz
|
250
|
+
# or higher are accepted.
|
251
|
+
#
|
252
|
+
# @option params [required, String] :media_encoding
|
253
|
+
# The encoding used for the input audio.
|
254
|
+
#
|
255
|
+
# @option params [String] :vocabulary_name
|
256
|
+
# The name of the medical custom vocabulary to use when processing the
|
257
|
+
# real-time stream.
|
258
|
+
#
|
259
|
+
# @option params [required, String] :specialty
|
260
|
+
# The medical specialty of the clinician or provider.
|
261
|
+
#
|
262
|
+
# @option params [required, String] :type
|
263
|
+
# The type of input audio. Choose `DICTATION` for a provider dictating
|
264
|
+
# patient notes. Choose `CONVERSATION` for a dialogue between a patient
|
265
|
+
# and one or more medical professionanls.
|
266
|
+
#
|
267
|
+
# @option params [Boolean] :show_speaker_label
|
268
|
+
# When `true`, enables speaker identification in your real-time stream.
|
269
|
+
#
|
270
|
+
# @option params [String] :session_id
|
271
|
+
# Optional. An identifier for the transcription session. If you don't
|
272
|
+
# provide a session ID, Amazon Transcribe generates one for you and
|
273
|
+
# returns it in the response.
|
274
|
+
#
|
275
|
+
# @option params [Boolean] :enable_channel_identification
|
276
|
+
# When `true`, instructs Amazon Transcribe Medical to process each audio
|
277
|
+
# channel separately and then merge the transcription output of each
|
278
|
+
# channel into a single transcription.
|
279
|
+
#
|
280
|
+
# Amazon Transcribe Medical also produces a transcription of each item.
|
281
|
+
# An item includes the start time, end time, and any alternative
|
282
|
+
# transcriptions.
|
283
|
+
#
|
284
|
+
# You can't set both `ShowSpeakerLabel` and
|
285
|
+
# `EnableChannelIdentification` in the same request. If you set both,
|
286
|
+
# your request returns a `BadRequestException`.
|
287
|
+
#
|
288
|
+
# @option params [Integer] :number_of_channels
|
289
|
+
# The number of channels that are in your audio stream.
|
290
|
+
#
|
291
|
+
# @option params [String] :content_identification_type
|
292
|
+
# Set this field to `PHI` to identify personal health information in the
|
293
|
+
# transcription output.
|
294
|
+
#
|
295
|
+
# @return [Types::StartMedicalStreamTranscriptionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
296
|
+
#
|
297
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#request_id #request_id} => String
|
298
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#language_code #language_code} => String
|
299
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#media_sample_rate_hertz #media_sample_rate_hertz} => Integer
|
300
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#media_encoding #media_encoding} => String
|
301
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#vocabulary_name #vocabulary_name} => String
|
302
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#specialty #specialty} => String
|
303
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#type #type} => String
|
304
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#show_speaker_label #show_speaker_label} => Boolean
|
305
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#session_id #session_id} => String
|
306
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#transcript_result_stream #transcript_result_stream} => Types::MedicalTranscriptResultStream
|
307
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#enable_channel_identification #enable_channel_identification} => Boolean
|
308
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#number_of_channels #number_of_channels} => Integer
|
309
|
+
# * {Types::StartMedicalStreamTranscriptionResponse#content_identification_type #content_identification_type} => String
|
310
|
+
#
|
311
|
+
# @example Bi-directional EventStream Operation Example
|
312
|
+
#
|
313
|
+
# You can signal input events after initial request is
|
314
|
+
# established, events will be sent to stream
|
315
|
+
# immediately (once stream connection is established successfully).
|
316
|
+
#
|
317
|
+
# To signal events, you can call #signal methods from an Aws::TranscribeStreamingService::EventStreams::AudioStream object.
|
318
|
+
# Make sure signal events before calling #wait or #join! at async response.
|
319
|
+
#
|
320
|
+
# input_stream = Aws::TranscribeStreamingService::EventStreams::AudioStream.new
|
321
|
+
#
|
322
|
+
# async_resp = client.start_medical_stream_transcription( # params input,
|
323
|
+
# input_event_stream_handler: input_stream) do |out_stream|
|
324
|
+
#
|
325
|
+
# # register callbacks for events arrival
|
326
|
+
# out_stream.on_transcript_event_event do |event|
|
327
|
+
# event # => Aws::TranscribeStreamingService::Types::TranscriptEvent
|
328
|
+
# end
|
329
|
+
# out_stream.on_bad_request_exception_event do |event|
|
330
|
+
# event # => Aws::TranscribeStreamingService::Types::BadRequestException
|
331
|
+
# end
|
332
|
+
# out_stream.on_limit_exceeded_exception_event do |event|
|
333
|
+
# event # => Aws::TranscribeStreamingService::Types::LimitExceededException
|
334
|
+
# end
|
335
|
+
# out_stream.on_internal_failure_exception_event do |event|
|
336
|
+
# event # => Aws::TranscribeStreamingService::Types::InternalFailureException
|
337
|
+
# end
|
338
|
+
# out_stream.on_conflict_exception_event do |event|
|
339
|
+
# event # => Aws::TranscribeStreamingService::Types::ConflictException
|
340
|
+
# end
|
341
|
+
# out_stream.on_service_unavailable_exception_event do |event|
|
342
|
+
# event # => Aws::TranscribeStreamingService::Types::ServiceUnavailableException
|
343
|
+
# end
|
344
|
+
#
|
345
|
+
# end
|
346
|
+
# # => returns Aws::Seahorse::Client::AsyncResponse
|
347
|
+
#
|
348
|
+
# # signal events
|
349
|
+
# input_stream.signal_audio_event_event( ... )
|
350
|
+
#
|
351
|
+
# # make sure signaling :end_stream in the end
|
352
|
+
# input_stream.signal_end_stream
|
353
|
+
#
|
354
|
+
# # wait until stream is closed before finalizing sync response
|
355
|
+
# resp = async_resp.wait
|
356
|
+
# # Or close stream and finalizing sync response immediately
|
357
|
+
# # resp = async_resp.join!
|
358
|
+
#
|
359
|
+
# Inorder to streamingly processing events received, you can also provide an Aws::TranscribeStreamingService::EventStreams::MedicalTranscriptResultStream
|
360
|
+
# object to register callbacks before initializing request instead of processing from request block
|
361
|
+
#
|
362
|
+
# output_stream = Aws::TranscribeStreamingService::EventStreams::MedicalTranscriptResultStream.new
|
363
|
+
# # register callbacks for events arrival
|
364
|
+
# output_stream.on_transcript_event_event do |event|
|
365
|
+
# event # => Aws::TranscribeStreamingService::Types::TranscriptEvent
|
366
|
+
# end
|
367
|
+
# output_stream.on_bad_request_exception_event do |event|
|
368
|
+
# event # => Aws::TranscribeStreamingService::Types::BadRequestException
|
369
|
+
# end
|
370
|
+
# output_stream.on_limit_exceeded_exception_event do |event|
|
371
|
+
# event # => Aws::TranscribeStreamingService::Types::LimitExceededException
|
372
|
+
# end
|
373
|
+
# output_stream.on_internal_failure_exception_event do |event|
|
374
|
+
# event # => Aws::TranscribeStreamingService::Types::InternalFailureException
|
375
|
+
# end
|
376
|
+
# output_stream.on_conflict_exception_event do |event|
|
377
|
+
# event # => Aws::TranscribeStreamingService::Types::ConflictException
|
378
|
+
# end
|
379
|
+
# output_stream.on_service_unavailable_exception_event do |event|
|
380
|
+
# event # => Aws::TranscribeStreamingService::Types::ServiceUnavailableException
|
381
|
+
# end
|
382
|
+
# output_stream.on_error_event do |event|
|
383
|
+
# # catch unmodeled error event in the stream
|
384
|
+
# raise event
|
385
|
+
# # => Aws::Errors::EventError
|
386
|
+
# # event.event_type => :error
|
387
|
+
# # event.error_code => String
|
388
|
+
# # event.error_message => String
|
389
|
+
# end
|
390
|
+
#
|
391
|
+
# async_resp = client.start_medical_stream_transcription ( #params input,
|
392
|
+
# input_event_stream_handler: input_stream
|
393
|
+
# output_event_stream_handler: output_stream
|
394
|
+
# )
|
395
|
+
#
|
396
|
+
# resp = async_resp.wait!
|
397
|
+
#
|
398
|
+
# Besides above usage patterns for process events when they arrive immediately, you can also
|
399
|
+
# iterate through events after response complete.
|
400
|
+
#
|
401
|
+
# Events are available at resp.transcript_result_stream # => Enumerator
|
402
|
+
#
|
403
|
+
# @example Request syntax with placeholder values
|
404
|
+
#
|
405
|
+
# async_resp = async_client.start_medical_stream_transcription({
|
406
|
+
# 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
|
407
|
+
# media_sample_rate_hertz: 1, # required
|
408
|
+
# media_encoding: "pcm", # required, accepts pcm, ogg-opus, flac
|
409
|
+
# vocabulary_name: "VocabularyName",
|
410
|
+
# specialty: "PRIMARYCARE", # required, accepts PRIMARYCARE, CARDIOLOGY, NEUROLOGY, ONCOLOGY, RADIOLOGY, UROLOGY
|
411
|
+
# type: "CONVERSATION", # required, accepts CONVERSATION, DICTATION
|
412
|
+
# show_speaker_label: false,
|
413
|
+
# session_id: "SessionId",
|
414
|
+
# input_event_stream_hander: EventStreams::AudioStream.new,
|
415
|
+
# enable_channel_identification: false,
|
416
|
+
# number_of_channels: 1,
|
417
|
+
# content_identification_type: "PHI", # accepts PHI
|
418
|
+
# })
|
419
|
+
# # => Seahorse::Client::AsyncResponse
|
420
|
+
# async_resp.wait
|
421
|
+
# # => Seahorse::Client::Response
|
422
|
+
# # Or use async_resp.join!
|
423
|
+
#
|
424
|
+
# @example Response structure
|
425
|
+
#
|
426
|
+
# resp.request_id #=> String
|
427
|
+
# resp.language_code #=> String, one of "en-US", "en-GB", "es-US", "fr-CA", "fr-FR", "en-AU", "it-IT", "de-DE", "pt-BR", "ja-JP", "ko-KR"
|
428
|
+
# resp.media_sample_rate_hertz #=> Integer
|
429
|
+
# resp.media_encoding #=> String, one of "pcm", "ogg-opus", "flac"
|
430
|
+
# resp.vocabulary_name #=> String
|
431
|
+
# resp.specialty #=> String, one of "PRIMARYCARE", "CARDIOLOGY", "NEUROLOGY", "ONCOLOGY", "RADIOLOGY", "UROLOGY"
|
432
|
+
# resp.type #=> String, one of "CONVERSATION", "DICTATION"
|
433
|
+
# resp.show_speaker_label #=> Boolean
|
434
|
+
# resp.session_id #=> String
|
435
|
+
# All events are available at resp.transcript_result_stream:
|
436
|
+
# resp.transcript_result_stream #=> Enumerator
|
437
|
+
# resp.transcript_result_stream.event_types #=> [:transcript_event, :bad_request_exception, :limit_exceeded_exception, :internal_failure_exception, :conflict_exception, :service_unavailable_exception]
|
438
|
+
#
|
439
|
+
# For :transcript_event event available at #on_transcript_event_event callback and response eventstream enumerator:
|
440
|
+
# event.transcript.results #=> Array
|
441
|
+
# event.transcript.results[0].result_id #=> String
|
442
|
+
# event.transcript.results[0].start_time #=> Float
|
443
|
+
# event.transcript.results[0].end_time #=> Float
|
444
|
+
# event.transcript.results[0].is_partial #=> Boolean
|
445
|
+
# event.transcript.results[0].alternatives #=> Array
|
446
|
+
# event.transcript.results[0].alternatives[0].transcript #=> String
|
447
|
+
# event.transcript.results[0].alternatives[0].items #=> Array
|
448
|
+
# event.transcript.results[0].alternatives[0].items[0].start_time #=> Float
|
449
|
+
# event.transcript.results[0].alternatives[0].items[0].end_time #=> Float
|
450
|
+
# event.transcript.results[0].alternatives[0].items[0].type #=> String, one of "pronunciation", "punctuation"
|
451
|
+
# event.transcript.results[0].alternatives[0].items[0].content #=> String
|
452
|
+
# event.transcript.results[0].alternatives[0].items[0].confidence #=> Float
|
453
|
+
# event.transcript.results[0].alternatives[0].items[0].speaker #=> String
|
454
|
+
# event.transcript.results[0].alternatives[0].entities #=> Array
|
455
|
+
# event.transcript.results[0].alternatives[0].entities[0].start_time #=> Float
|
456
|
+
# event.transcript.results[0].alternatives[0].entities[0].end_time #=> Float
|
457
|
+
# event.transcript.results[0].alternatives[0].entities[0].category #=> String
|
458
|
+
# event.transcript.results[0].alternatives[0].entities[0].content #=> String
|
459
|
+
# event.transcript.results[0].alternatives[0].entities[0].confidence #=> Float
|
460
|
+
# event.transcript.results[0].channel_id #=> String
|
461
|
+
#
|
462
|
+
# For :bad_request_exception event available at #on_bad_request_exception_event callback and response eventstream enumerator:
|
463
|
+
# event.message #=> String
|
464
|
+
#
|
465
|
+
# For :limit_exceeded_exception event available at #on_limit_exceeded_exception_event callback and response eventstream enumerator:
|
466
|
+
# event.message #=> String
|
467
|
+
#
|
468
|
+
# For :internal_failure_exception event available at #on_internal_failure_exception_event callback and response eventstream enumerator:
|
469
|
+
# event.message #=> String
|
470
|
+
#
|
471
|
+
# For :conflict_exception event available at #on_conflict_exception_event callback and response eventstream enumerator:
|
472
|
+
# event.message #=> String
|
473
|
+
#
|
474
|
+
# For :service_unavailable_exception event available at #on_service_unavailable_exception_event callback and response eventstream enumerator:
|
475
|
+
# event.message #=> String
|
476
|
+
#
|
477
|
+
# resp.enable_channel_identification #=> Boolean
|
478
|
+
# resp.number_of_channels #=> Integer
|
479
|
+
# resp.content_identification_type #=> String, one of "PHI"
|
480
|
+
#
|
481
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartMedicalStreamTranscription AWS API Documentation
|
482
|
+
#
|
483
|
+
# @overload start_medical_stream_transcription(params = {})
|
484
|
+
# @param [Hash] params ({})
|
485
|
+
def start_medical_stream_transcription(params = {}, options = {}, &block)
|
486
|
+
params = params.dup
|
487
|
+
input_event_stream_handler = _event_stream_handler(
|
488
|
+
:input,
|
489
|
+
params.delete(:input_event_stream_handler),
|
490
|
+
EventStreams::AudioStream
|
491
|
+
)
|
492
|
+
output_event_stream_handler = _event_stream_handler(
|
493
|
+
:output,
|
494
|
+
params.delete(:output_event_stream_handler) || params.delete(:event_stream_handler),
|
495
|
+
EventStreams::MedicalTranscriptResultStream
|
496
|
+
)
|
497
|
+
|
498
|
+
yield(output_event_stream_handler) if block_given?
|
499
|
+
|
500
|
+
req = build_request(:start_medical_stream_transcription, params)
|
501
|
+
|
502
|
+
req.context[:input_event_stream_handler] = input_event_stream_handler
|
503
|
+
req.handlers.add(Aws::Binary::EncodeHandler, priority: 95)
|
504
|
+
req.context[:output_event_stream_handler] = output_event_stream_handler
|
505
|
+
req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
|
506
|
+
|
507
|
+
req.send_request(options, &block)
|
508
|
+
end
|
509
|
+
|
240
510
|
# Starts a bidirectional HTTP2 stream where audio is streamed to Amazon
|
241
511
|
# Transcribe and the transcription results are streamed to your
|
242
512
|
# application.
|
@@ -259,7 +529,7 @@ module Aws::TranscribeStreamingService
|
|
259
529
|
# 8000 Hz for low quality audio and 16000 Hz for high quality audio.
|
260
530
|
#
|
261
531
|
# @option params [required, String] :media_encoding
|
262
|
-
# The encoding used for the input audio.
|
532
|
+
# The encoding used for the input audio.
|
263
533
|
#
|
264
534
|
# @option params [String] :vocabulary_name
|
265
535
|
# The name of the vocabulary to use when processing the transcription
|
@@ -287,6 +557,21 @@ module Aws::TranscribeStreamingService
|
|
287
557
|
# @option params [Boolean] :show_speaker_label
|
288
558
|
# When `true`, enables speaker identification in your real-time stream.
|
289
559
|
#
|
560
|
+
# @option params [Boolean] :enable_channel_identification
|
561
|
+
# When `true`, instructs Amazon Transcribe to process each audio channel
|
562
|
+
# separately and then merge the transcription output of each channel
|
563
|
+
# into a single transcription.
|
564
|
+
#
|
565
|
+
# Amazon Transcribe also produces a transcription of each item. An item
|
566
|
+
# includes the start time, end time, and any alternative transcriptions.
|
567
|
+
#
|
568
|
+
# You can't set both `ShowSpeakerLabel` and
|
569
|
+
# `EnableChannelIdentification` in the same request. If you set both,
|
570
|
+
# your request returns a `BadRequestException`.
|
571
|
+
#
|
572
|
+
# @option params [Integer] :number_of_channels
|
573
|
+
# The number of channels that are in your audio stream.
|
574
|
+
#
|
290
575
|
# @return [Types::StartStreamTranscriptionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
291
576
|
#
|
292
577
|
# * {Types::StartStreamTranscriptionResponse#request_id #request_id} => String
|
@@ -299,6 +584,8 @@ module Aws::TranscribeStreamingService
|
|
299
584
|
# * {Types::StartStreamTranscriptionResponse#vocabulary_filter_name #vocabulary_filter_name} => String
|
300
585
|
# * {Types::StartStreamTranscriptionResponse#vocabulary_filter_method #vocabulary_filter_method} => String
|
301
586
|
# * {Types::StartStreamTranscriptionResponse#show_speaker_label #show_speaker_label} => Boolean
|
587
|
+
# * {Types::StartStreamTranscriptionResponse#enable_channel_identification #enable_channel_identification} => Boolean
|
588
|
+
# * {Types::StartStreamTranscriptionResponse#number_of_channels #number_of_channels} => Integer
|
302
589
|
#
|
303
590
|
# @example Bi-directional EventStream Operation Example
|
304
591
|
#
|
@@ -395,15 +682,17 @@ module Aws::TranscribeStreamingService
|
|
395
682
|
# @example Request syntax with placeholder values
|
396
683
|
#
|
397
684
|
# async_resp = async_client.start_stream_transcription({
|
398
|
-
# language_code: "en-US", # required, accepts en-US, en-GB, es-US, fr-CA, fr-FR, en-AU
|
685
|
+
# 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
|
399
686
|
# media_sample_rate_hertz: 1, # required
|
400
|
-
# media_encoding: "pcm", # required, accepts pcm
|
687
|
+
# media_encoding: "pcm", # required, accepts pcm, ogg-opus, flac
|
401
688
|
# vocabulary_name: "VocabularyName",
|
402
689
|
# session_id: "SessionId",
|
403
690
|
# input_event_stream_hander: EventStreams::AudioStream.new,
|
404
691
|
# vocabulary_filter_name: "VocabularyFilterName",
|
405
692
|
# vocabulary_filter_method: "remove", # accepts remove, mask, tag
|
406
693
|
# show_speaker_label: false,
|
694
|
+
# enable_channel_identification: false,
|
695
|
+
# number_of_channels: 1,
|
407
696
|
# })
|
408
697
|
# # => Seahorse::Client::AsyncResponse
|
409
698
|
# async_resp.wait
|
@@ -413,9 +702,9 @@ module Aws::TranscribeStreamingService
|
|
413
702
|
# @example Response structure
|
414
703
|
#
|
415
704
|
# resp.request_id #=> String
|
416
|
-
# resp.language_code #=> String, one of "en-US", "en-GB", "es-US", "fr-CA", "fr-FR", "en-AU"
|
705
|
+
# resp.language_code #=> String, one of "en-US", "en-GB", "es-US", "fr-CA", "fr-FR", "en-AU", "it-IT", "de-DE", "pt-BR", "ja-JP", "ko-KR"
|
417
706
|
# resp.media_sample_rate_hertz #=> Integer
|
418
|
-
# resp.media_encoding #=> String, one of "pcm"
|
707
|
+
# resp.media_encoding #=> String, one of "pcm", "ogg-opus", "flac"
|
419
708
|
# resp.vocabulary_name #=> String
|
420
709
|
# resp.session_id #=> String
|
421
710
|
# All events are available at resp.transcript_result_stream:
|
@@ -437,6 +726,7 @@ module Aws::TranscribeStreamingService
|
|
437
726
|
# event.transcript.results[0].alternatives[0].items[0].content #=> String
|
438
727
|
# event.transcript.results[0].alternatives[0].items[0].vocabulary_filter_match #=> Boolean
|
439
728
|
# event.transcript.results[0].alternatives[0].items[0].speaker #=> String
|
729
|
+
# event.transcript.results[0].channel_id #=> String
|
440
730
|
#
|
441
731
|
# For :bad_request_exception event available at #on_bad_request_exception_event callback and response eventstream enumerator:
|
442
732
|
# event.message #=> String
|
@@ -456,6 +746,8 @@ module Aws::TranscribeStreamingService
|
|
456
746
|
# resp.vocabulary_filter_name #=> String
|
457
747
|
# resp.vocabulary_filter_method #=> String, one of "remove", "mask", "tag"
|
458
748
|
# resp.show_speaker_label #=> Boolean
|
749
|
+
# resp.enable_channel_identification #=> Boolean
|
750
|
+
# resp.number_of_channels #=> Integer
|
459
751
|
#
|
460
752
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscription AWS API Documentation
|
461
753
|
#
|
@@ -500,7 +792,7 @@ module Aws::TranscribeStreamingService
|
|
500
792
|
http_response: Seahorse::Client::Http::AsyncResponse.new,
|
501
793
|
config: config)
|
502
794
|
context[:gem_name] = 'aws-sdk-transcribestreamingservice'
|
503
|
-
context[:gem_version] = '1.
|
795
|
+
context[:gem_version] = '1.25.0'
|
504
796
|
Seahorse::Client::Request.new(handlers, context)
|
505
797
|
end
|
506
798
|
|
@@ -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.25.0'
|
355
355
|
Seahorse::Client::Request.new(handlers, context)
|
356
356
|
end
|
357
357
|
|
@@ -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,17 +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')
|
46
|
+
NumberOfChannels = Shapes::IntegerShape.new(name: 'NumberOfChannels')
|
33
47
|
RequestId = Shapes::StringShape.new(name: 'RequestId')
|
34
48
|
Result = Shapes::StructureShape.new(name: 'Result')
|
35
49
|
ResultList = Shapes::ListShape.new(name: 'ResultList')
|
36
50
|
ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
|
37
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')
|
38
55
|
StartStreamTranscriptionRequest = Shapes::StructureShape.new(name: 'StartStreamTranscriptionRequest')
|
39
56
|
StartStreamTranscriptionResponse = Shapes::StructureShape.new(name: 'StartStreamTranscriptionResponse')
|
40
57
|
String = Shapes::StringShape.new(name: 'String')
|
41
58
|
Transcript = Shapes::StructureShape.new(name: 'Transcript')
|
42
59
|
TranscriptEvent = Shapes::StructureShape.new(name: 'TranscriptEvent')
|
43
60
|
TranscriptResultStream = Shapes::StructureShape.new(name: 'TranscriptResultStream')
|
61
|
+
Type = Shapes::StringShape.new(name: 'Type')
|
44
62
|
VocabularyFilterMethod = Shapes::StringShape.new(name: 'VocabularyFilterMethod')
|
45
63
|
VocabularyFilterName = Shapes::StringShape.new(name: 'VocabularyFilterName')
|
46
64
|
VocabularyName = Shapes::StringShape.new(name: 'VocabularyName')
|
@@ -79,11 +97,62 @@ module Aws::TranscribeStreamingService
|
|
79
97
|
LimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
80
98
|
LimitExceededException.struct_class = Types::LimitExceededException
|
81
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
|
+
|
82
150
|
Result.add_member(:result_id, Shapes::ShapeRef.new(shape: String, location_name: "ResultId"))
|
83
151
|
Result.add_member(:start_time, Shapes::ShapeRef.new(shape: Double, location_name: "StartTime"))
|
84
152
|
Result.add_member(:end_time, Shapes::ShapeRef.new(shape: Double, location_name: "EndTime"))
|
85
153
|
Result.add_member(:is_partial, Shapes::ShapeRef.new(shape: Boolean, location_name: "IsPartial"))
|
86
154
|
Result.add_member(:alternatives, Shapes::ShapeRef.new(shape: AlternativeList, location_name: "Alternatives"))
|
155
|
+
Result.add_member(:channel_id, Shapes::ShapeRef.new(shape: String, location_name: "ChannelId"))
|
87
156
|
Result.struct_class = Types::Result
|
88
157
|
|
89
158
|
ResultList.member = Shapes::ShapeRef.new(shape: Result)
|
@@ -91,6 +160,39 @@ module Aws::TranscribeStreamingService
|
|
91
160
|
ServiceUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
92
161
|
ServiceUnavailableException.struct_class = Types::ServiceUnavailableException
|
93
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
|
+
|
94
196
|
StartStreamTranscriptionRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location: "header", location_name: "x-amzn-transcribe-language-code"))
|
95
197
|
StartStreamTranscriptionRequest.add_member(:media_sample_rate_hertz, Shapes::ShapeRef.new(shape: MediaSampleRateHertz, required: true, location: "header", location_name: "x-amzn-transcribe-sample-rate"))
|
96
198
|
StartStreamTranscriptionRequest.add_member(:media_encoding, Shapes::ShapeRef.new(shape: MediaEncoding, required: true, location: "header", location_name: "x-amzn-transcribe-media-encoding"))
|
@@ -100,6 +202,8 @@ module Aws::TranscribeStreamingService
|
|
100
202
|
StartStreamTranscriptionRequest.add_member(:vocabulary_filter_name, Shapes::ShapeRef.new(shape: VocabularyFilterName, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-name"))
|
101
203
|
StartStreamTranscriptionRequest.add_member(:vocabulary_filter_method, Shapes::ShapeRef.new(shape: VocabularyFilterMethod, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-method"))
|
102
204
|
StartStreamTranscriptionRequest.add_member(:show_speaker_label, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-show-speaker-label"))
|
205
|
+
StartStreamTranscriptionRequest.add_member(:enable_channel_identification, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-enable-channel-identification"))
|
206
|
+
StartStreamTranscriptionRequest.add_member(:number_of_channels, Shapes::ShapeRef.new(shape: NumberOfChannels, location: "header", location_name: "x-amzn-transcribe-number-of-channels"))
|
103
207
|
StartStreamTranscriptionRequest.struct_class = Types::StartStreamTranscriptionRequest
|
104
208
|
StartStreamTranscriptionRequest[:payload] = :audio_stream
|
105
209
|
StartStreamTranscriptionRequest[:payload_member] = StartStreamTranscriptionRequest.member(:audio_stream)
|
@@ -114,6 +218,8 @@ module Aws::TranscribeStreamingService
|
|
114
218
|
StartStreamTranscriptionResponse.add_member(:vocabulary_filter_name, Shapes::ShapeRef.new(shape: VocabularyFilterName, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-name"))
|
115
219
|
StartStreamTranscriptionResponse.add_member(:vocabulary_filter_method, Shapes::ShapeRef.new(shape: VocabularyFilterMethod, location: "header", location_name: "x-amzn-transcribe-vocabulary-filter-method"))
|
116
220
|
StartStreamTranscriptionResponse.add_member(:show_speaker_label, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-show-speaker-label"))
|
221
|
+
StartStreamTranscriptionResponse.add_member(:enable_channel_identification, Shapes::ShapeRef.new(shape: Boolean, location: "header", location_name: "x-amzn-transcribe-enable-channel-identification"))
|
222
|
+
StartStreamTranscriptionResponse.add_member(:number_of_channels, Shapes::ShapeRef.new(shape: NumberOfChannels, location: "header", location_name: "x-amzn-transcribe-number-of-channels"))
|
117
223
|
StartStreamTranscriptionResponse.struct_class = Types::StartStreamTranscriptionResponse
|
118
224
|
StartStreamTranscriptionResponse[:payload] = :transcript_result_stream
|
119
225
|
StartStreamTranscriptionResponse[:payload_member] = StartStreamTranscriptionResponse.member(:transcript_result_stream)
|
@@ -150,6 +256,20 @@ module Aws::TranscribeStreamingService
|
|
150
256
|
"uid" => "transcribe-streaming-2017-10-26",
|
151
257
|
}
|
152
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
|
+
|
153
273
|
api.add_operation(:start_stream_transcription, Seahorse::Model::Operation.new.tap do |o|
|
154
274
|
o.name = "StartStreamTranscription"
|
155
275
|
o.http_method = "POST"
|
@@ -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
|
@@ -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`
|
56
|
-
# invalid. For example,
|
57
|
-
# `
|
58
|
-
# try your request
|
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
|
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
|
@@ -195,6 +399,14 @@ module Aws::TranscribeStreamingService
|
|
195
399
|
# transcription.
|
196
400
|
# @return [Array<Types::Alternative>]
|
197
401
|
#
|
402
|
+
# @!attribute [rw] channel_id
|
403
|
+
# When channel identification is enabled, Amazon Transcribe
|
404
|
+
# transcribes the speech from each audio channel separately.
|
405
|
+
#
|
406
|
+
# You can use `ChannelId` to retrieve the transcription results for a
|
407
|
+
# single channel in your audio stream.
|
408
|
+
# @return [String]
|
409
|
+
#
|
198
410
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/Result AWS API Documentation
|
199
411
|
#
|
200
412
|
class Result < Struct.new(
|
@@ -202,7 +414,8 @@ module Aws::TranscribeStreamingService
|
|
202
414
|
:start_time,
|
203
415
|
:end_time,
|
204
416
|
:is_partial,
|
205
|
-
:alternatives
|
417
|
+
:alternatives,
|
418
|
+
:channel_id)
|
206
419
|
SENSITIVE = []
|
207
420
|
include Aws::Structure
|
208
421
|
end
|
@@ -221,19 +434,203 @@ module Aws::TranscribeStreamingService
|
|
221
434
|
include Aws::Structure
|
222
435
|
end
|
223
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
|
+
|
224
619
|
# @note When making an API call, you may pass StartStreamTranscriptionRequest
|
225
620
|
# data as a hash:
|
226
621
|
#
|
227
622
|
# {
|
228
|
-
# 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
|
229
624
|
# media_sample_rate_hertz: 1, # required
|
230
|
-
# media_encoding: "pcm", # required, accepts pcm
|
625
|
+
# media_encoding: "pcm", # required, accepts pcm, ogg-opus, flac
|
231
626
|
# vocabulary_name: "VocabularyName",
|
232
627
|
# session_id: "SessionId",
|
233
628
|
# input_event_stream_hander: EventStreams::AudioStream.new,
|
234
629
|
# vocabulary_filter_name: "VocabularyFilterName",
|
235
630
|
# vocabulary_filter_method: "remove", # accepts remove, mask, tag
|
236
631
|
# show_speaker_label: false,
|
632
|
+
# enable_channel_identification: false,
|
633
|
+
# number_of_channels: 1,
|
237
634
|
# }
|
238
635
|
#
|
239
636
|
# @!attribute [rw] language_code
|
@@ -247,8 +644,7 @@ module Aws::TranscribeStreamingService
|
|
247
644
|
# @return [Integer]
|
248
645
|
#
|
249
646
|
# @!attribute [rw] media_encoding
|
250
|
-
# The encoding used for the input audio.
|
251
|
-
# value.
|
647
|
+
# The encoding used for the input audio.
|
252
648
|
# @return [String]
|
253
649
|
#
|
254
650
|
# @!attribute [rw] vocabulary_name
|
@@ -288,6 +684,24 @@ module Aws::TranscribeStreamingService
|
|
288
684
|
# stream.
|
289
685
|
# @return [Boolean]
|
290
686
|
#
|
687
|
+
# @!attribute [rw] enable_channel_identification
|
688
|
+
# When `true`, instructs Amazon Transcribe to process each audio
|
689
|
+
# channel separately and then merge the transcription output of each
|
690
|
+
# channel into a single transcription.
|
691
|
+
#
|
692
|
+
# Amazon Transcribe also produces a transcription of each item. An
|
693
|
+
# item includes the start time, end time, and any alternative
|
694
|
+
# transcriptions.
|
695
|
+
#
|
696
|
+
# You can't set both `ShowSpeakerLabel` and
|
697
|
+
# `EnableChannelIdentification` in the same request. If you set both,
|
698
|
+
# your request returns a `BadRequestException`.
|
699
|
+
# @return [Boolean]
|
700
|
+
#
|
701
|
+
# @!attribute [rw] number_of_channels
|
702
|
+
# The number of channels that are in your audio stream.
|
703
|
+
# @return [Integer]
|
704
|
+
#
|
291
705
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscriptionRequest AWS API Documentation
|
292
706
|
#
|
293
707
|
class StartStreamTranscriptionRequest < Struct.new(
|
@@ -299,7 +713,9 @@ module Aws::TranscribeStreamingService
|
|
299
713
|
:audio_stream,
|
300
714
|
:vocabulary_filter_name,
|
301
715
|
:vocabulary_filter_method,
|
302
|
-
:show_speaker_label
|
716
|
+
:show_speaker_label,
|
717
|
+
:enable_channel_identification,
|
718
|
+
:number_of_channels)
|
303
719
|
SENSITIVE = []
|
304
720
|
include Aws::Structure
|
305
721
|
end
|
@@ -346,6 +762,14 @@ module Aws::TranscribeStreamingService
|
|
346
762
|
# Shows whether speaker identification was enabled in the stream.
|
347
763
|
# @return [Boolean]
|
348
764
|
#
|
765
|
+
# @!attribute [rw] enable_channel_identification
|
766
|
+
# Shows whether channel identification has been enabled in the stream.
|
767
|
+
# @return [Boolean]
|
768
|
+
#
|
769
|
+
# @!attribute [rw] number_of_channels
|
770
|
+
# The number of channels identified in the stream.
|
771
|
+
# @return [Integer]
|
772
|
+
#
|
349
773
|
# @see http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/StartStreamTranscriptionResponse AWS API Documentation
|
350
774
|
#
|
351
775
|
class StartStreamTranscriptionResponse < Struct.new(
|
@@ -358,7 +782,9 @@ module Aws::TranscribeStreamingService
|
|
358
782
|
:transcript_result_stream,
|
359
783
|
:vocabulary_filter_name,
|
360
784
|
:vocabulary_filter_method,
|
361
|
-
:show_speaker_label
|
785
|
+
:show_speaker_label,
|
786
|
+
:enable_channel_identification,
|
787
|
+
:number_of_channels)
|
362
788
|
SENSITIVE = []
|
363
789
|
include Aws::Structure
|
364
790
|
end
|
@@ -422,6 +848,29 @@ module Aws::TranscribeStreamingService
|
|
422
848
|
|
423
849
|
end
|
424
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
|
+
|
425
874
|
# Represents the transcription result stream from Amazon Transcribe to
|
426
875
|
# your application.
|
427
876
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-transcribestreamingservice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.109.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.109.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|