Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using speech Started or vad events #12

Open
Ashutosh-rawat-vassarlabs opened this issue Nov 18, 2024 · 0 comments
Open

using speech Started or vad events #12

Ashutosh-rawat-vassarlabs opened this issue Nov 18, 2024 · 0 comments

Comments

@Ashutosh-rawat-vassarlabs

else {
console.log(deepgram STT: [Interim Result] ${transcript});
if (speaking) {
console.log('twilio: clear audio playback', streamSid);
// Handles Barge In
const messageJSON = JSON.stringify({
"event": "clear",
"streamSid": streamSid,
});
mediaStream.connection.sendUTF(messageJSON);
mediaStream.deepgramTTSWebsocket.send(JSON.stringify({ 'type': 'Clear' }));
speaking = false;
}
}
}

rather waitinf for the interim result which comes  after every 1 second . can we use this speech started event 

or will it make some waste requests or use less requests ,
can u suggest me why have not used this vad events = true for this case . is it not a good idea to follow .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant