Skip to main content

AssemblyAI STT

The AssemblyAI STT provider enables your agent to use AssemblyAI's real-time WebSocket API for fast and accurate speech-to-text conversion.

Installation

Install the AssemblyAI-enabled VideoSDK Agents package:

pip install "videosdk-plugins-assemblyai"

Authentication

The AssemblyAI plugin requires an AssemblyAI API key.

Set ASSEMBLYAI_API_KEY in your .env file.

Importing

from videosdk.plugins.assemblyai import AssemblyAISTT

Example Usage

from videosdk.plugins.assemblyai import AssemblyAISTT
from videosdk.agents import CascadingPipeline

# Initialize the AssemblyAI STT model
stt = AssemblyAISTT(
api_key="your-assemblyai-api-key",
language_code="en_us"
)

# Add stt to cascading pipeline
pipeline = CascadingPipeline(stt=stt)
note

When using a .env file for credentials, don't pass them as arguments to model instances. The SDK automatically reads environment variables, so omit api_key and other credential parameters from your code.

Configuration Options

  • api_key: Your AssemblyAI API key (required, can also be set via ASSEMBLYAI_API_KEY environment variable).
  • language_code: The language code for transcription (e.g., "en_us", "es").

Additional Resources

The following resources provide more information about using AssemblyAI with the VideoSDK Agents SDK.

  • AssemblyAI Docs: AssemblyAI's official real-time streaming transcription documentation.

import PluginResourceCards from '@site/src/components/PluginResourceCards'

<PluginResourceCards
sdkReferenceUrl="https://docs.videosdk.live/agent-sdk-reference/plugins-assemblyai/"
githubUrl="https://github.com/videosdk-live/agents/blob/main/videosdk-plugins/videosdk-plugins-assemblyai/videosdk/plugins/assemblyai/stt.py"
/>

Got a Question? Ask us on discord