Class: Aws::TranscribeStreamingService::EventStreams::AudioStream

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-transcribestreamingservice/event_streams.rb,
lib/aws-sdk-transcribestreamingservice/event_streams.rb,
lib/aws-sdk-transcribestreamingservice/event_streams.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAudioStream

Returns a new instance of AudioStream.



14
15
16
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 14

def initialize
  @event_emitter = Aws::EventEmitter.new
end

Instance Attribute Details

#event_emitterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Aws::EventEmitter.

Returns:

  • Aws::EventEmitter



52
53
54
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 52

def event_emitter
  @event_emitter
end

Instance Method Details

#signal_audio_event_event(params = {}) ⇒ Object

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :audio_chunk (String, StringIO, File)

    An audio blob that contains the next part of the audio that you want to transcribe. The maximum audio chunk size is 32 KB.



22
23
24
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 22

def signal_audio_event_event(params = {})
  @event_emitter.emit(:audio_event, params)
end

#signal_configuration_event_event(params = {}) ⇒ Object

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):



42
43
44
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 42

def signal_configuration_event_event(params = {})
  @event_emitter.emit(:configuration_event, params)
end

#signal_end_streamObject



46
47
48
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 46

def signal_end_stream
  @event_emitter.emit(:end_stream, {})
end