Class: Aws::LexRuntimeV2::Types::AudioInputEvent

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb

Overview

Note:

When making an API call, you may pass AudioInputEvent data as a hash:

{
  audio_chunk: "data",
  content_type: "NonEmptyString", # required
  event_id: "EventId",
  client_timestamp_millis: 1,
}

Represents a chunk of audio sent from the client application to Amazon Lex V2. The audio is all or part of an utterance from the user.

Amazon Lex V2 accumulates audio chunks until it recognizes a natural pause in speech before processing the input.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#audio_chunkString

An encoded stream of audio.

Returns:

  • (String)


149
150
151
152
153
154
155
156
157
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 149

class AudioInputEvent < Struct.new(
  :audio_chunk,
  :content_type,
  :event_id,
  :client_timestamp_millis,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#client_timestamp_millisInteger

A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.

Returns:

  • (Integer)


149
150
151
152
153
154
155
156
157
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 149

class AudioInputEvent < Struct.new(
  :audio_chunk,
  :content_type,
  :event_id,
  :client_timestamp_millis,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#content_typeString

The encoding used for the audio chunk. You must use 8 KHz PCM 16-bit mono-channel little-endian format. The value of the field should be:

audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false

Returns:

  • (String)


149
150
151
152
153
154
155
156
157
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 149

class AudioInputEvent < Struct.new(
  :audio_chunk,
  :content_type,
  :event_id,
  :client_timestamp_millis,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#event_idString

A unique identifier that your application assigns to the event. You can use this to identify events in logs.

Returns:

  • (String)


149
150
151
152
153
154
155
156
157
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 149

class AudioInputEvent < Struct.new(
  :audio_chunk,
  :content_type,
  :event_id,
  :client_timestamp_millis,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#event_typeObject

Returns the value of attribute event_type

Returns:

  • (Object)

    the current value of event_type



149
150
151
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 149

def event_type
  @event_type
end