Skip to main content

Smart Turn Detection Plugin

An AI-powered turn detection plugin for Vision Agents that uses the Smart Turn model to detect when a speaker has completed their turn in a conversation.

Overview

Smart Turn is an open-source, community-driven, native audio turn detection model that goes beyond simple Voice Activity Detection (VAD). It analyzes grammar, tone, pace of speech, and various other complex audio and semantic cues to determine when a user has finished speaking, matching human expectations more closely than VAD-based approaches.

For more information about the Smart Turn model, visit the official repository.

Installation

uv add "vision-agents[smart_turn]"
# or directly
uv add vision-agents-plugins-smart-turn

Usage

from vision_agents.plugins.smart_turn import TurnDetection

# Initialize with FAL API key from environment variable
turn_detector = TurnDetection()

# Or specify API key directly
turn_detector = TurnDetection(api_key="your_fal_api_key")


# Register event handlers
@turn_detector.on("turn_started")
def on_turn_started(event_data):
    print(f"Turn started: {event_data.participant}")


@turn_detector.on("turn_ended")
def on_turn_ended(event_data):
    print(f"Turn ended: {event_data.participant} (confidence: {event_data.confidence:.3f})")


# Start detection
turn_detector.start()

# Process audio
await turn_detector.process_audio(pcm_data, user_id="user123")

# Stop detection
turn_detector.close()

Configuration Options

  • api_key: FAL API key (default: reads from FAL_KEY environment variable)
  • buffer_duration: Duration in seconds to buffer audio before processing (default: 2.0)
  • confidence_threshold: Probability threshold for "complete" predictions (default: 0.5)
  • sample_rate: Audio sample rate in Hz (default: 16000)
  • channels: Number of audio channels (default: 1)

Metadata

Release files for vision-agents-plugins-smart-turn 0.6.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vision-agents-plugins-smart-turn 0.6.9
File Size Uploaded Provenance
vision_agents_plugins_smart_turn-0.6.9.tar.gz 7.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vision-agents-plugins-smart-turn 0.6.9
File Interpreter ABI Platform
vision_agents_plugins_smart_turn-0.6.9-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / vision_agents_plugins_smart_turn-0.6.9.tar.gz

Download URL vision_agents_plugins_smart_turn-0.6.9.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6d4868349a8de63073344b5120ce8d0e9286291f74f30f68df615631b5300771
BLAKE2b-256 checksum
How to use checksums
aff40097ac34a498c50ca24a4f5d19956847d1bd011e47111c096f759f2cad5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / vision_agents_plugins_smart_turn-0.6.9-py3-none-any.whl

Download URL vision_agents_plugins_smart_turn-0.6.9-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1e1e0c17a11c26b34a900c0d97f354902f6180e74bc11c8a7598e6c8ca1a4ac
BLAKE2b-256 checksum
How to use checksums
9c7bad3b102252e6934af514a73de8fcd30f30b39beb9e8ee3349581bdce4338
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for vision-agents-plugins-smart-turn 0.6.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.6.9 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page