We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have tried using setInterval() function and options.interval but it's not working.
The text was updated successfully, but these errors were encountered:
You can do that from your own code...
For example, I want to listen for silence after 2 seconds...
import * as moment from "moment" let speaking, silence, timerCount, timeCountInterval, silenceTime = null const SILENCE_TIME = 2 * 1000 // 2 sec hark.on("speaking", () => { speaking = true }) hark.on("stoped_speaking", () => { if (!silenceTime) { silenceTime = moment().unix() } setTimeInterval(() => { if (speaking === true && silenceTime && moment().unix() - silenceTime >= SILENCE_TIME) { // Do what ever you want to do here, we know they are now silence speaking = false clearInterval(timeCountInterval) } }, 1000) // run every 1 sec })
Sorry, something went wrong.
No branches or pull requests
I have tried using setInterval() function and options.interval but it's not working.
The text was updated successfully, but these errors were encountered: