-1

I want to make an application that stores (since opened) the last 2 or 3 seconds from the current moment (until is closed). Is it possible with any of this methods? https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBuffer

https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource

2 Answers2

0

No, not by themselves. But you can do this with some clever restructuring of RecorderJS - https://github.com/mattdiamond/Recorderjs.

cwilso
  • 13,610
  • 1
  • 30
  • 35
  • Here is the deal: - Save the last milliseconds; - Quantify the energy of the voice (micro) in real time; - Save the last milliseconds + the voice above a limit of energy; – João Cardoso Mar 16 '15 at 23:08
0

You can do something like this with a WebAudio DelayLine node. Without knowing what you want to do with the audio, it's hard to say if this solves your problem, but variants on this (creating AudioDestinationNodes and feeding a ring buffer in JS, etc) should handle any variation.

jesup
  • 6,765
  • 27
  • 32
  • Here is the deal: - Save the last milliseconds (of voice); - Quantify the energy of the voice (micro) in real time; - Save the last milliseconds + the voice above a limit of energy; [Some kind of minimalist VAD] – João Cardoso Mar 16 '15 at 23:05