Class: AWSCDK::Lex::CfnBot::VoiceSettingsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lex/cfn_bot.rb

Overview

Defines settings for using an Amazon Polly voice to communicate with a user.

Valid values include:

  • standard
  • neural
  • long-form
  • generative

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(voice_id:, engine: nil) ⇒ VoiceSettingsProperty

Returns a new instance of VoiceSettingsProperty.

Parameters:

  • voice_id (String)

    The identifier of the Amazon Polly voice to use.

  • engine (String, nil) (defaults to: nil)

    Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user.



6678
6679
6680
6681
6682
6683
# File 'lex/cfn_bot.rb', line 6678

def initialize(voice_id:, engine: nil)
  @voice_id = voice_id
  Jsii::Type.check_type(@voice_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "voiceId")
  @engine = engine
  Jsii::Type.check_type(@engine, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "engine") unless @engine.nil?
end

Instance Attribute Details

#engineString? (readonly)

Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user.

For more information, see the engine parameter of the SynthesizeSpeech operation in the Amazon Polly developer guide .

If you do not specify a value, the default is standard .



6698
6699
6700
# File 'lex/cfn_bot.rb', line 6698

def engine
  @engine
end

#voice_idString (readonly)

The identifier of the Amazon Polly voice to use.



6689
6690
6691
# File 'lex/cfn_bot.rb', line 6689

def voice_id
  @voice_id
end

Class Method Details

.jsii_propertiesObject



6700
6701
6702
6703
6704
6705
# File 'lex/cfn_bot.rb', line 6700

def self.jsii_properties
  {
    :voice_id => "voiceId",
    :engine => "engine",
  }
end

Instance Method Details

#to_jsiiObject



6707
6708
6709
6710
6711
6712
6713
6714
# File 'lex/cfn_bot.rb', line 6707

def to_jsii
  result = {}
  result.merge!({
    "voiceId" => @voice_id,
    "engine" => @engine,
  })
  result.compact
end