Skip to main content

AssemblyAI streaming STT integration for Vision Agents

Project description

AssemblyAI Plugin

Streaming Speech-to-Text (STT) plugin for Vision Agents using AssemblyAI's Universal-3 Pro model.

Features

  • Real-time streaming transcription via async WebSocket
  • Built-in punctuation-based turn detection with configurable silence thresholds
  • Native SpeechStarted event support
  • Custom prompt and keyterms boosting support
  • Sub-300ms time to complete transcript latency
  • Built-in reconnection with exponential backoff

Installation

uv add vision-agents[assemblyai]

Usage

from vision_agents.plugins import assemblyai

stt = assemblyai.STT(
    speech_model="u3-rt-pro",  # Default model
    sample_rate=16000,
)

With keyterms boosting

stt = assemblyai.STT(
    keyterms_prompt=["AssemblyAI", "Vision Agents"],
)

With custom turn silence thresholds

stt = assemblyai.STT(
    min_turn_silence=100,   # ms before speculative EOT check
    max_turn_silence=1200,  # ms before forcing turn end
)

Configuration

Parameter Description Default
api_key AssemblyAI API key (falls back to ASSEMBLYAI_API_KEY env var) None
speech_model Model identifier "u3-rt-pro"
sample_rate Audio sample rate in Hz 16000
min_turn_silence Silence (ms) before speculative end-of-turn check API default
max_turn_silence Maximum silence (ms) before forcing turn end API default
prompt Custom transcription prompt (cannot be combined with keyterms_prompt) None
keyterms_prompt List of terms to boost recognition for (cannot be combined with prompt) None
max_reconnect_attempts Maximum reconnect attempts on transient failures 3
reconnect_backoff_initial_s Initial backoff delay in seconds 0.5
reconnect_backoff_max_s Maximum backoff delay in seconds 4.0

Environment Variables

Set ASSEMBLYAI_API_KEY in your environment or pass api_key to the constructor.

Dependencies

  • aiohttp>=3.9.0
  • vision-agents

Docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vision_agents_plugins_assemblyai-0.4.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file vision_agents_plugins_assemblyai-0.4.1.tar.gz.

File metadata

File hashes

Hashes for vision_agents_plugins_assemblyai-0.4.1.tar.gz
Algorithm Hash digest
SHA256 9e726124ebfb21d738765fabca2d14c90638a1641a7950028eed1a6e867485d7
MD5 be21a92153b629f2b6298da9c2c30bfc
BLAKE2b-256 584a0dd11424f34d60fe836660d7456995c37d6658de6b78c5f9d59b50c3a1e5

See more details on using hashes here.

File details

Details for the file vision_agents_plugins_assemblyai-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for vision_agents_plugins_assemblyai-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05e00bb330cb113b8e3f04deb022c8202d2a823b2c96ae912dd8db43f11a4121
MD5 8a93c007e482bf2016c55e108dac0462
BLAKE2b-256 9cc8ace8f5c9aa396bc1eb11c98c889afbcdce89ff9f87f0b19a95f7bb2abd43

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page