AssemblyAI

Updated

Integrate AssemblyAI ASR into Conversational AI Engine.

AssemblyAI 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 AssemblyAI ASR when starting a conversational AI agent.

from agora_agent import Agent, AssemblyAISTT

# client is your configured Agora client
agent = (
    Agent(client)
    .with_stt(AssemblyAISTT(
        api_key='your-assemblyai-key',
        language='en-US',
        uri='wss://streaming.assemblyai.com/v3/ws',
    ))
    .with_llm(...)  # configure your LLM vendor
    .with_tts(...)  # configure your TTS vendor
)
import { Agent, AssemblyAISTT } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(new AssemblyAISTT({
    apiKey: 'your-assemblyai-key',
    language: 'en-US',
    uri: 'wss://streaming.assemblyai.com/v3/ws',
  }))
  .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.NewAssemblyAISTT(vendors.AssemblyAISTTOptions{
        APIKey:   "your-assemblyai-key",
        Language: "en-US",
        URI:      "wss://streaming.assemblyai.com/v3/ws",
    }),
).WithLlm(/* configure your LLM vendor */).
  WithTts(/* configure your TTS vendor */)

Use the following asr configuration in your request:

"asr": {
  "vendor": "assemblyai",
  "language": "en-US",
  "params": {
    "api_key": "<assemblyai_api_key>",
    "language": "en-US",
    "uri": "wss://streaming.assemblyai.com/v3/ws"
  }
}

Caution

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 AssemblyAI official documentation.

Key parameters

paramsrequired
api_keystring
required

The API key used for authentication. Get your API key from the AssemblyAI Dashboard.

languagestring
required

The language code for speech recognition.

uristring
optional

The WebSocket URL for the AssemblyAI's streaming API. Specify this to target a particular region. For example, wss://streaming.assemblyai.com/v3/ws.