Skip to content

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

@spaarg-tech

Description

@spaarg-tech

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions