Comments (1)
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
})
from hark.
Related Issues (20)
- In ham radio, this is called "squelch" HOT 8
- Doesn't seem to work for Remote Peer RTC Connections HOT 2
- Seems to stop working when page is not foreground HOT 6
- Link the demo with https:// HOT 1
- Add bower support HOT 3
- Because turning away and silencing contributors is the best thing you can think of? HOT 1
- Any way we could get a version on npm without example folder HOT 2
- Strange values in Safari when mic volumen is 0 HOT 4
- Some incoming deprecations HOT 2
- Publish 1.2.0 to npm HOT 1
- Still maintained? HOT 2
- does not work in chrome? HOT 4
- Random error in Safari: TypeError: null is not an object (evaluating 'audioContext.createAnalyser') HOT 6
- Chrome 71 will require user gesture for AudioContext to work HOT 3
- recordrtc.js + hark.js = corrupted stream audio records (robotic voice + echo + noise) in safari HOT 2
- deleted
- Webpage stop working
- is it possible to use this package with react native?
- hark.bundle.js is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hark.