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

How to catch VOICE event with createStream? I want to avoid silent parts of the speech. #8

Open
spaarg-tech opened this issue Feb 16, 2024 · 0 comments

Comments

@spaarg-tech
Copy link

Hello @Snirpo,

Thanks for the awesome work on the VAD project, I am trying to access the VOICE event in the createStream.

The following code works, but I want to send the buffer to the transcriber only when there is a speech not on Silence.

vadStreamPipe.on("data", (buffer) => {
      transcriber.sendAudio(buffer.audioData);
});

I want to send audio only when VOICE is there.

vadStreamPipe.on('VOICE',(buffer)=>{
      transcriber.sendAudio(buffer.audioData);
});

Something like the above should work. I have tried it but not working.

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