简体   繁体   English

分析来自麦克风Javascript的音频输入

[英]Analyze audio input from microphone Javascript

I am planning to create a music visualizer on a website. 我打算在网站上创建一个音乐可视化工具。 There are objects that should change in size, and shape based off of the current music that is playing (a non-classical, multi-line song probably, such as Don't Stop believing). 有些物体应该根据正在播放的当前音乐改变大小和形状(可能是非经典的多行歌曲,例如Do not Stop believe)。 I want to at least be able to know the volume of the music and if possible, any pitches that can be picked up (is FFT possible in Javascript?). 我想至少能够知道音乐的音量,如果可能的话,任何可以拾取的音高(在Javascript中可以进行FFT吗?)。 Are there Sound API's out there that that will let me do this in Javascript, or at least online? 是否有声音API可以让我在Javascript或至少在线执行此操作?

Yes, this is possible with the Web Audio API. 是的,这可以通过Web Audio API实现。 Check out the Audio Input demo on http://webaudiodemos.appspot.com/ . 查看http://webaudiodemos.appspot.com/上的音频输入演示。 You don't need to perform the FFT yourself - the web audio api will do it for you. 您不需要自己执行FFT - 网络音频API将为您完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM