Laya Turn Detector
A model for detecting the end of an utterance in voice assistants
2 min readupdated
This model analyzes dialogue history, the current agent status, and partially recognized user text to determine whether the person has finished their thought or is continuing to speak. Based on the multilingual Laya model using the mmBERT encoder, it contains 322 million parameters. The tool evaluates four conversation state options, helping voice bots respond on time without interrupting the user. The model is useful for developers of voice interfaces who need support for English and Hinglish.
Key features
- Four categories: Classifies utterances as complete, incomplete, backchannels, and unclear intent.
- Hybrid approach: Combines text analysis with audio models and VAD to accurately detect pauses.
- Multilingualism: Trained on datasets for English and Hinglish using synthetic speech data.
- Export and optimization: Supports running via PyTorch and is optimized for ONNX and OpenVINO for fast execution on CPUs.
What you can do
- Bot integration: Embed into a voice assistant pipeline for real-time dynamic pause detection.
- Dialogue improvement: Configure correct agent reactions to short interjections and backchannels during a monologue.
- CPU optimization: Deploy the model using OpenVINO to achieve low latency on server hardware.
Example
import json
import laya
LABELS = ("BACKCHANNEL", "USER_DONE", "USER_UNFINISHED", "UNCLEAR")
FIELDS = ("history", "assistant_spoken_text", "assistant_state", "user_speech_state", "user_partial_text")
QUESTION = {
"turn": {
"type": "choice",
"instructions": "Classify the user's current text in context.",
"criteria": {
"BACKCHANNEL": "listener feedback",
"USER_DONE": "a substantive contribution that can end here",
"USER_UNFINISHED": "a substantive contribution needing more words",
"UNCLEAR": "its intent is not yet clear",
},
}
}
agent = laya.load("hiteshwadhwani/laya-turn-detector", device="cpu")
print(agent)
Read more
DetailsBenchmarks: Macro-F1 for English is 0.745, for Hinglish is 0.776.
Hardware support: Efficient during inference via OpenVINO BF16 on CPUs with a p50 latency of about 54 ms.
Limitations: Works with text only (ignoring intonation), trained strictly on English and Hinglish.
License: Apache 2.0.










Comments