-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
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
Web Worker Example for Mono & Stereo #17
Conversation
logbon72
commented
Oct 26, 2015
- Fixed examples in README.md
- Added Web Worker example, which works well with Mono & Stereo input.
- Added Web Worker example, which works well with Mono & Stereo input.
Thank you dear logbon72, so you already coded it? cant wait to see it, what about making an example that combines my code below to record from microphone using this library with your web worker? navigator.getUserMedia = navigator.getUserMedia || allow=0; afl=0; var contexttemp = new AudioContext(); function upload(blobOrFile) { var item = document.createElement('li'); var au = document.createElement('audio'); xhr.onreadystatechange = function(e) { function record() {
}
// console.log(buffer); |
I'm use next code for convert floatArray to int16Array.
|
dear Joseph, your code for the web worker works great a blend of both, that worked in Chrome, Firefox and Edge (because Safari doesnt support apparently GetUserMedia), in both desktop and mobile, would be the Perfect solution |
See the latest commit,
|
Dear Joseph, this is exciting, im testing, it, one first thing, the sound recorded is not matching the speed rate of Mic, are you doing this? to get the sampleRate of system and convert to mp3 at same rate? thats why we need to detect rate first and use same rate in the encoder :) |
here it is, in the worker file we need to change that config.sampleRate || 44100 var contexttemp = new AudioContext(); so that there is a match, then sound recorded will sound same frequency/pitch as sound coming from mic :) this is a fantastic example by the way dear Joseph thank you very much :) apart from the rate issue, next question will be to test this to see if it works in:
i will test it in those platforms to see if it works :) |
@javismiles @logbon72 thanks for your input, great work! |
Web Worker Example for Mono & Stereo