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)
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 viaASSEMBLYAI_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.
-
Python package: The
videosdk-plugins-assemblyai
package on PyPI. -
GitHub repo: View the source or contribute to the VideoSDK AssemblyAI STT plugin.
-
AssemblyAI Docs: AssemblyAI's official real-time streaming transcription documentation.
Got a Question? Ask us on discord