top | item 26056350

Web Spectrogram using your Mic

88 points| sova | 5 years ago |borismus.github.io | reply

36 comments

order
[+] ncrmro|5 years ago|reply
An interesting thing in most audio classification machine learning, you train good ol image recognition on spectrograms.
[+] ben_w|5 years ago|reply
This implies it would be possible for deaf people to learn to hear by sight with an app on a Google Glass.
[+] tandav|5 years ago|reply
And thats weird, but there exists several papers which uses 1D - convolutions on raw audio
[+] 1MachineElf|5 years ago|reply
Hey, this is really cool! There is a high pitched whistle I can do with my front teeth, and I was finally able to measure it using this tool. Running it on two laptops, both are giving me a measurements of 4 - 8 kHz. I learned how to make that whistle 10 years ago, and have been wondering how high pitched it was ever since.
[+] arthurcolle|5 years ago|reply
Is it easy to recreate audio from, say, an image file of the spectrogram results?
[+] bsmith0|5 years ago|reply
Yes, I built a really bad version of it a while ago: https://braeden.dev/waterfall/

Click waterfall, and then click play when you have the audio on your computer playing outloud.

If you play the audio outloud, your mic should be able to pick up a barely recognizable version of the picture (try the heart first to calibrate the "row delay").

https://github.com/braeden/waterfall

Take a look at the example pictures on github ^, poor, but functional fully web version.

[+] piannucci|5 years ago|reply
To add to what others have said--

The spectrogram image contains amplitude, but not phase information. (There are partial exceptions in special cases involving oversampling.) Conveniently, the human auditory system is primarily sensitive to the same information present in the spectrogram.

[+] gbh444g|5 years ago|reply
No. But with enough effort and reasonable assumptions, you can restore most of the sound. It would be enough for speech, but not enough for high quality music.
[+] findthewords|5 years ago|reply
The bog-standard spectrogram you see in most programs is very lossy and ”smeary”. Clearer, sharper algorithms exist.
[+] rjmunro|5 years ago|reply
I get the following in the console, unless I click very fast as the page is loading:

(index):27 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu

There are also warnings about mixing insecure content, specifically the non-https version of Google fonts.

[+] high_byte|5 years ago|reply
I LOVE IT! you just made my toilet sitting much more enjoyable. because it's based on microphone it's interesting to see the echoes produces on multiples of the frequency, depending on the volume of my phone. simple design, works fast on mobile too. very cool.
[+] exikyut|5 years ago|reply
Feature request: distinguish clicks from taps, and move the frequency indicator say 50-100px upward so it's not directly under my finger :P
[+] tasty_freeze|5 years ago|reply
I'm in my mid 50s. This web page showed me I can hear 16 Khz if it is loud enough, but not 17 Khz.
[+] pantelisk|5 years ago|reply
it might be your speakers. Speakers are't neutral, they are optimized for a specific frequency response. Which means that the loudness might be "dropping significantly" rather than you not being able to listen to a specific frequency. Use pro headphones to properly test your hearing :)

(that's also why expensive studio monitors cost so much - the "this song sounds good on any type of speakers, from in ear-headphones, to cheap car radio speakers, to pro headphones to on cheap television", master once listen/play everywhere, used to be a big problem in the audio world. (it might still be, but I left that world -- consider the cheap car radio speakers as the Internet Explorer 6 of the audio world and you get the idea!)

[+] borismus|5 years ago|reply
It’s not necessarily your ears. Could also be the frequency response of your speakers
[+] exikyut|5 years ago|reply
This made me curious and I went and found https://www.szynalski.com/tone-generator/. (Can strongly recommend ignoring this site's volume control and using your own for the lower frequencies!) Playing around with briefly unmuting my audio output for short bursts, I found I couldn't go past 17kHz too. I did need to judiciously turn the volume up though.
[+] cozzyd|5 years ago|reply
hah, I did not know the AudioContext could do FFTs. That's cool, although I'd have to see if it can be coerced to do that for arbitrary (non-audio-like) inputs. I've always used an emscriptened KissFFT for stuff like this...
[+] toomim|5 years ago|reply
This doesn't work in Safari :(

But it's very fun in Chrome! :)

[+] BugsJustFindMe|5 years ago|reply
For me it only worked in Firefox, neither Chrome nor Safari.
[+] shaicoleman|5 years ago|reply
On Linux, it works on Firefox. On Chrome, it only worked after retrying half a dozen times.