Skip to content

Create Bot Locale

lexmodelsv2_create_bot_locale R Documentation

Creates a locale in the bot

Description

Creates a locale in the bot. The locale contains the intents and slot types that the bot uses in conversations with users in the specified language and locale. You must add a locale to a bot before you can add intents and slot types to the bot.

Usage

lexmodelsv2_create_bot_locale(botId, botVersion, localeId, description,
  nluIntentConfidenceThreshold, voiceSettings, unifiedSpeechSettings,
  audioFillerSettings, speechRecognitionSettings, generativeAISettings,
  speechDetectionSensitivity)

Arguments

botId

[required] The identifier of the bot to create the locale for.

botVersion

[required] The version of the bot to create the locale for. This can only be the draft version of the bot.

localeId

[required] The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.

description

A description of the bot locale. Use this to help identify the bot locale in lists.

nluIntentConfidenceThreshold

[required] Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.

For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the RecognizeText operation would be:

  • AMAZON.FallbackIntent

  • IntentA

  • IntentB

  • IntentC

voiceSettings

The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.

unifiedSpeechSettings

Unified speech settings to configure for the new bot locale.

audioFillerSettings

Audio filler settings to configure for the new bot locale. When enabled, Amazon Lex plays a brief background audio filler during speech-to-speech interactions to mask processing delays. Requires unifiedSpeechSettings (speech-to-speech) to be configured on the bot locale.

speechRecognitionSettings

Speech-to-text settings to configure for the new bot locale.

generativeAISettings

Contains specifications about the generative AI capabilities from Amazon Bedrock that you can turn on for your bot.

speechDetectionSensitivity

The sensitivity level for voice activity detection (VAD) in the bot locale. This setting helps optimize speech recognition accuracy by adjusting how the system responds to background noise during voice interactions.

Value

A list with the following syntax:

list(
  botId = "string",
  botVersion = "string",
  localeName = "string",
  localeId = "string",
  description = "string",
  nluIntentConfidenceThreshold = 123.0,
  voiceSettings = list(
    engine = "standard"|"neural"|"long-form"|"generative",
    voiceId = "string"
  ),
  unifiedSpeechSettings = list(
    speechFoundationModel = list(
      modelArn = "string",
      voiceId = "string"
    )
  ),
  audioFillerSettings = list(
    enabled = TRUE|FALSE,
    audioType = "MELODY_CHIPPER_CHIME"|"MELODY_CURIOUS_CRAWL"|"MELODY_RISING_RIPPLE"|"MELODY_PATIENT_PING"|"MELODY_PONDERING_PONG"|"TYPING_KINETIC_KEYS"|"TYPING_QUIET_QWERTY",
    startDelayInMilliseconds = 123,
    minimumPlayDurationInMilliseconds = 123,
    responseDeliveryDelayInMilliseconds = 123
  ),
  speechRecognitionSettings = list(
    speechModelPreference = "Standard"|"Neural"|"Deepgram",
    speechModelConfig = list(
      deepgramConfig = list(
        apiTokenSecretArn = "string",
        modelId = "string"
      )
    )
  ),
  botLocaleStatus = "Creating"|"Building"|"Built"|"ReadyExpressTesting"|"Failed"|"Deleting"|"NotBuilt"|"Importing"|"Processing",
  creationDateTime = as.POSIXct(
    "2015-01-01"
  ),
  generativeAISettings = list(
    runtimeSettings = list(
      slotResolutionImprovement = list(
        enabled = TRUE|FALSE,
        bedrockModelSpecification = list(
          modelArn = "string",
          guardrail = list(
            identifier = "string",
            version = "string"
          ),
          traceStatus = "ENABLED"|"DISABLED",
          customPrompt = "string"
        )
      ),
      nluImprovement = list(
        enabled = TRUE|FALSE,
        assistedNluMode = "Primary"|"Fallback",
        intentDisambiguationSettings = list(
          enabled = TRUE|FALSE,
          maxDisambiguationIntents = 123,
          customDisambiguationMessage = "string"
        )
      )
    ),
    buildtimeSettings = list(
      descriptiveBotBuilder = list(
        enabled = TRUE|FALSE,
        bedrockModelSpecification = list(
          modelArn = "string",
          guardrail = list(
            identifier = "string",
            version = "string"
          ),
          traceStatus = "ENABLED"|"DISABLED",
          customPrompt = "string"
        )
      ),
      sampleUtteranceGeneration = list(
        enabled = TRUE|FALSE,
        bedrockModelSpecification = list(
          modelArn = "string",
          guardrail = list(
            identifier = "string",
            version = "string"
          ),
          traceStatus = "ENABLED"|"DISABLED",
          customPrompt = "string"
        )
      )
    )
  ),
  speechDetectionSensitivity = "Default"|"HighNoiseTolerance"|"MaximumNoiseTolerance"
)

Request syntax

svc$create_bot_locale(
  botId = "string",
  botVersion = "string",
  localeId = "string",
  description = "string",
  nluIntentConfidenceThreshold = 123.0,
  voiceSettings = list(
    engine = "standard"|"neural"|"long-form"|"generative",
    voiceId = "string"
  ),
  unifiedSpeechSettings = list(
    speechFoundationModel = list(
      modelArn = "string",
      voiceId = "string"
    )
  ),
  audioFillerSettings = list(
    enabled = TRUE|FALSE,
    audioType = "MELODY_CHIPPER_CHIME"|"MELODY_CURIOUS_CRAWL"|"MELODY_RISING_RIPPLE"|"MELODY_PATIENT_PING"|"MELODY_PONDERING_PONG"|"TYPING_KINETIC_KEYS"|"TYPING_QUIET_QWERTY",
    startDelayInMilliseconds = 123,
    minimumPlayDurationInMilliseconds = 123,
    responseDeliveryDelayInMilliseconds = 123
  ),
  speechRecognitionSettings = list(
    speechModelPreference = "Standard"|"Neural"|"Deepgram",
    speechModelConfig = list(
      deepgramConfig = list(
        apiTokenSecretArn = "string",
        modelId = "string"
      )
    )
  ),
  generativeAISettings = list(
    runtimeSettings = list(
      slotResolutionImprovement = list(
        enabled = TRUE|FALSE,
        bedrockModelSpecification = list(
          modelArn = "string",
          guardrail = list(
            identifier = "string",
            version = "string"
          ),
          traceStatus = "ENABLED"|"DISABLED",
          customPrompt = "string"
        )
      ),
      nluImprovement = list(
        enabled = TRUE|FALSE,
        assistedNluMode = "Primary"|"Fallback",
        intentDisambiguationSettings = list(
          enabled = TRUE|FALSE,
          maxDisambiguationIntents = 123,
          customDisambiguationMessage = "string"
        )
      )
    ),
    buildtimeSettings = list(
      descriptiveBotBuilder = list(
        enabled = TRUE|FALSE,
        bedrockModelSpecification = list(
          modelArn = "string",
          guardrail = list(
            identifier = "string",
            version = "string"
          ),
          traceStatus = "ENABLED"|"DISABLED",
          customPrompt = "string"
        )
      ),
      sampleUtteranceGeneration = list(
        enabled = TRUE|FALSE,
        bedrockModelSpecification = list(
          modelArn = "string",
          guardrail = list(
            identifier = "string",
            version = "string"
          ),
          traceStatus = "ENABLED"|"DISABLED",
          customPrompt = "string"
        )
      )
    )
  ),
  speechDetectionSensitivity = "Default"|"HighNoiseTolerance"|"MaximumNoiseTolerance"
)