Practical Machine Learning in JavaScript by Charlie Gerard

Practical Machine Learning in JavaScript by Charlie Gerard

Author:Charlie Gerard
Language: eng
Format: epub
ISBN: 9781484264188
Publisher: Apress


5.1.2 Accessing audio data

In JavaScript, the Web API that lets developers access data coming from the computer’s microphone is the Web Audio API.

If you have never used this API before, it’s totally fine; we are going to go through the main lines you need to get set up everything.

To start, we need to access the AudioContext interface on the global window object, as well as making sure we can get permission to access an audio and video input device with getUserMedia.window.AudioContext = window.AudioContext || window.webkitAudioContext;

navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.