End-of-turn detector

Finished, or just pausing?

A fixed silence timer cannot tell. Viraam listens to how the last eight seconds of speech sound and answers at every pause, so the agent replies fast when you are done and waits when you are not.

22 ms
to score a pause, one CPU core
10 MB
model, runs without a GPU
200 ms
of silence before the first answer

Live

Speak, pause, carry on

Say a sentence and stop in the middle to think. Your voice rises as a ribbon of lines. At each pause the model leaves a tag: amber to keep waiting, green to reply.

The microphone is off.

● keep waiting● reply● replied, but you carried on

Finished, says the model
–
Current silence
–
Time to score
–
PauseModel saidDecisionYouFixed 700 ms timer
Start the microphone and speak. Each pause adds a row here.

No microphone? Score a real test recording:

Audio is sent to the scoring service and is not stored. Sample recordings are from the FLEURS corpus (CC BY 4.0).

What happens at a pause

1

You go quiet

After 200 ms of silence the agent asks the model. A timer would still be counting.

2

The model listens back

It hears the last 8 seconds: the falling pitch and fading energy of an ending, or the held tone of a thought in progress.

3

The agent replies or waits

Confident you finished: reply now. Otherwise keep listening, for up to 1.5 seconds.

Results

Measured, including where it loses

As an agent's turn-taking rule

406 unedited Hindi test recordings. “Cut off” means the agent replied before the speaker had finished.

0%30%60%90%200 ms500 ms700 ms1000 msmean wait before replyingspeakers cut off300 ms timer500 ms timer700 ms timer1000 ms timerViraam at 50%Viraam at 90%
RuleSpeakers cut offMean wait
Fixed 300 ms silence79.3%300 ms
Fixed 500 ms silence55.7%500 ms
Viraam, reply at 50%46.8%218 ms
Viraam, reply at 90%36.2%341 ms
Fixed 700 ms silence24.1%700 ms
Fixed 1,000 ms silence7.9%1,000 ms

Faster and less interrupting than a 500 ms timer. It does not yet reach the low cut-off rate of a 700 ms timer; pauses at commas are the main cause.

Against Smart Turn v3.2, on its own test set

Pipecat's published test clips (synthetic speech). Smart Turn trained on this collection; Viraam had never seen it. Accuracy:

Hindi 1,284 clips

Viraam 73.8%
Smart Turn 92.8%

Marathi 774 clips

Viraam 68.6%
Smart Turn 88.1%

Bengali 1,000 clips

Viraam 68.2%
Smart Turn 85.1%

Smart Turn wins clearly here. On Viraam's own test recordings the order reverses: it recognises 98.3% of true endings against Smart Turn's 75.9%. Each model is strongest on speech like its training data. Widening Viraam's training data is the next piece of work.

API

One request per pause

Send the speech so far, up to the pause. You get back the probability that the turn is complete.

HTTP
curl -X POST http://localhost:7861/predict \
  -F "file=@speech_so_far.wav"

{
  "probability": 0.0731,
  "complete": false,
  "seconds_received": 3.42,
  "inference_ms": 22.4
}
Python, no network
from indic_eot import EndOfTurnDetector

detector = EndOfTurnDetector.load()

# audio: mono float32 at 16 kHz
p = detector.predict(audio)
if p >= 0.5:
    reply()            # the speaker is done
else:
    keep_listening()   # only a pause

Limits

What it cannot do yet