Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Detección de aplausos usando Javascript

Soy bastante nuevo en la pregunta, pero intento algo como esto.

Sé que Audio api es potente pero no entiendo mucho, así que vine con:

 let asClap = false; let tampon = 60; navigator.mediaDevices.getUserMedia({ "audio": { "mandatory": { "googEchoCancellation": "false", "googAutoGainControl": "false", "googNoiseSuppression": "false", "googHighpassFilter": "false" }, "optional": [] }, }).then(function(stream) { const audioContext = new AudioContext(); /* use the stream */ let gain_node = audioContext.createGain(); gain_node.connect( audioContext.destination ); let microphone_stream = audioContext.createMediaStreamSource(stream); let analyser = audioContext.createAnalyser() microphone_stream.connect(analyser) analyser.fftSize = 256; isClaping(analyser) }).catch(function(err) { console.log(err) }); function isClaping(analyser){ const bufferLength = analyser.frequencyBinCount; var data = new Uint8Array(bufferLength); analyser.getByteFrequencyData(data); const arraySum = data.reduce((a, value) => a + value); if(arraySum >= 3000){ if(!asClap){ asClap = true; clap() } } requestAnimationFrame(()=>{isClaping(analyser)}); tampon-- if(tampon === 0){ tampon = 60 asClap = false } }

Realmente necesito hacerlo en Javascript, ya que estoy más familiarizado con ¿Es correcto y cómo puedo detectar el doble aplauso?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!