Verbara.Sdk.VoiceAi.TurnDetection
2.2.1
dotnet add package Verbara.Sdk.VoiceAi.TurnDetection --version 2.2.1
NuGet\Install-Package Verbara.Sdk.VoiceAi.TurnDetection -Version 2.2.1
<PackageReference Include="Verbara.Sdk.VoiceAi.TurnDetection" Version="2.2.1" />
<PackageVersion Include="Verbara.Sdk.VoiceAi.TurnDetection" Version="2.2.1" />
<PackageReference Include="Verbara.Sdk.VoiceAi.TurnDetection" />
paket add Verbara.Sdk.VoiceAi.TurnDetection --version 2.2.1
#r "nuget: Verbara.Sdk.VoiceAi.TurnDetection, 2.2.1"
#:package Verbara.Sdk.VoiceAi.TurnDetection@2.2.1
#addin nuget:?package=Verbara.Sdk.VoiceAi.TurnDetection&version=2.2.1
#tool nuget:?package=Verbara.Sdk.VoiceAi.TurnDetection&version=2.2.1
Verbara.Sdk.VoiceAi.TurnDetection
ML-based turn detection for the Verbara.Sdk VoiceAi pipeline using the Pipecat smart-turn-v3 ONNX model. Detects semantic end-of-turn boundaries — not just silence — for more natural conversational turn-taking.
Installation
dotnet add package Verbara.Sdk.VoiceAi.TurnDetection
Note: This package bundles the
smart-turn-v3.2-cpu.onnxmodel as an embedded resource. CPU inference works on all platforms. GPU acceleration (CUDA / DirectML) requires the matching ONNX Runtime provider package.
Quick Start
Replace the default SilenceTurnDetector with the smart ML-based detector by calling AddSmartTurnDetection in your DI setup:
services.AddVoiceAiPipeline<MyHandler>();
services.AddSmartTurnDetection(opts =>
{
opts.TurnConfidenceThreshold = 0.5f; // probability threshold (0.0–1.0)
opts.SilenceTriggerDuration = TimeSpan.FromMilliseconds(200);
opts.BargInVoiceThreshold = TimeSpan.FromMilliseconds(200);
opts.ExecutionProvider = ExecutionProvider.Cpu;
opts.IntraOpThreads = 1;
});
AddSmartTurnDetection removes any previously registered ITurnDetector and registers SmartTurnDetector in its place.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
TurnConfidenceThreshold |
float |
0.5 |
Minimum model probability to classify a pause as end-of-turn |
SilenceThresholdDb |
double |
-40.0 |
RMS energy threshold (dBFS) for silence detection |
SilenceTriggerDuration |
TimeSpan |
200ms |
Silence duration after speech before running the model |
BargInVoiceThreshold |
TimeSpan |
200ms |
Voice duration during TTS playback to trigger barge-in |
ExecutionProvider |
ExecutionProvider |
Cpu |
ONNX Runtime execution provider |
IntraOpThreads |
int |
1 |
Number of intra-op threads for ONNX Runtime |
License
MIT — see LICENSE in the repository root.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
- Microsoft.ML.OnnxRuntime (>= 1.26.0)
- Verbara.Sdk.Audio (>= 2.2.1)
- Verbara.Sdk.VoiceAi (>= 2.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.