Microsoft Azure
Updated
Integrate Microsoft Azure ASR into Conversational AI Engine.
Microsoft Azure provides enterprise-grade automatic speech recognition with support for multiple languages and robust noise handling capabilities, optimized for real-time conversational applications.
Sample configuration
The following example shows how to configure Microsoft Azure ASR when starting a conversational AI agent.
from agora_agent import Agent, MicrosoftSTT
# client is your configured Agora client
agent = (
Agent(client)
.with_stt(MicrosoftSTT(
key='your-azure-key',
region='eastus',
language='en-US',
))
.with_llm(...) # configure your LLM vendor
.with_tts(...) # configure your TTS vendor
)import { Agent, MicrosoftSTT } from 'agora-agents';
// client is your configured Agora client
const agent = new Agent({ client })
.withStt(new MicrosoftSTT({
key: 'your-azure-key',
region: 'eastus',
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.NewMicrosoftSTT(vendors.MicrosoftSTTOptions{
Key: "your-azure-key",
Region: "eastus",
Language: "en-US",
}),
).WithLlm(/* configure your LLM vendor */).
WithTts(/* configure your TTS vendor */)Use the following asr configuration in your request:
"asr": {
"vendor": "microsoft",
"language": "en-US",
"params": {
"key": "<microsoft_key>",
"region": "eastus",
"language": "en-US",
"phrase_list": ["agora", "conversational", "ai", "engine"]
}
}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 Microsoft Azure Speech-to-Text documentation.
Key parameters
keystringThe API key used for authentication. Get your API key from the Azure Portal.
regionstringThe Azure region where the speech service is hosted (For example, eastus, westus2).
languagestringThe language code for speech recognition (For example, en-US, es-ES, fr-FR). See supported languages for language codes.
phrase_listarray[string]A list of words or phrases provided in advance to improve recognition accuracy.
