Amazon Transcribe

Updated

Integrate Amazon ASR into Conversational AI Engine.

Amazon provides advanced automatic speech recognition with high accuracy and support for multiple languages, designed for real-time conversational AI applications.

Info

This integration is fully supported for use with Conversational AI Engine. While it has completed functional validation, it is newer to the platform, and additional provider-specific edge cases may be identified as usage scales across a broader range of applications and workloads.

Sample configuration

The following example shows how to configure Amazon Transcribe ASR when starting a conversational AI agent.

from agora_agent import Agent, AmazonSTT

# client is your configured Agora client
agent = (
    Agent(client)
    .with_stt(AmazonSTT(
        access_key='your-aws-access-key-id',
        secret_key='your-aws-secret-access-key',
        region='us-east-1',
        language='en-US',
    ))
    .with_llm(...)  # configure your LLM vendor
    .with_tts(...)  # configure your TTS vendor
)
import { Agent, AmazonSTT } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(new AmazonSTT({
    accessKey: 'your-aws-access-key-id',
    secretKey: 'your-aws-secret-access-key',
    region: 'us-east-1',
    language: 'en-US',
  }))
  .withLlm(/* configure your LLM vendor */)
  .withTts(/* configure your TTS vendor */);
import "github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"

// client is your configured Agora client
agent := agentkit.NewAgent(client).WithStt(
    vendors.NewAmazonSTT(vendors.AmazonSTTOptions{
        AccessKey: "your-aws-access-key-id",
        SecretKey: "your-aws-secret-access-key",
        Region:    "us-east-1",
        Language:  "en-US",
    }),
).WithLlm(/* configure your LLM vendor */).
  WithTts(/* configure your TTS vendor */)
"asr": {
    "vendor": "amazon",
    "params": {
        "region": "<AWS_ASR_REGION>",
        "access_key_id": "<AWS_ASR_ACCESS_KEY_ID>",
        "secret_access_key": "<AWS_ASR_SECRET_ACCESS_KEY>",
        "language_code": "en-US",
        "media_sample_rate_hz": 16000,
        "media_encoding": "pcm"
    }
}

Key parameters

paramsrequired
regionstring
required

The AWS region where the Transcribe service is hosted, for example, us-east-1, us-west-2, or eu-west-1. See AWS regions for available regions.

access_key_idstring
required

The AWS access key ID used for authentication. Get your access key from the AWS IAM Console.

secret_access_keystring
required

The AWS secret access key used for authentication. Get your secret key from the AWS IAM Console.

language_codestring
required

The language code for speech recognition, for example, en-US, es-US, or fr-FR. See supported languages for available language codes.

media_sample_rate_hzinteger
optional

The sample rate in Hertz for the audio input, for example, 16000 or 8000.

media_encodingstring
optional

The encoding format of the audio input, for example, pcm, opus, or flac.

The parameters listed on this page are validated for use with Conversational AI Engine. Required parameters must be provided as documented. Any additional parameters are passed through directly to the underlying vendor without validation. For a full list of supported options, refer to the Amazon official documentation.