** Audio Stream / Live Detection Using an AudioWorkletProcessor, incoming audio stream is recorded in pulse-code modulation format. Once roughly one second of audio is recorded, the chuck is sent to a web worker running the key finder WebAssembly module. Message passing and analysis repeats until key detection is ended.
** Audio File / File Analysis To prepare for analysis, audio files are first decoded into pulse-code modulation format. Once decoding is done, one second chunks are sent to the web worker running the key finder WebAssembly module. Message passing and analysis repeats until whole audio file is exhausted.
In contrast to live analysis, key detection workload for audio files can be processed in parallel. Once decoding is completed on the main thread, each audio file in the queue works with a dedicated web worker.
Refer to [[./ARCHITECTURE.org][system overview]] for more details.
key-finder-wasm already includes the built artifacts, key-finder-web can be run without compiling the wasm module.
** key-finder-wasm * Prerequisites ** emscripten
source ./
**** curl
sudo apt-get update sudo apt-get install curl
*** Installation Following command will fetch [[https://github.com/FFTW/fftw3][FFTW3]] and [[https://github.com/mixxxdj/libKeyFinder][libKeyFinder]] and compile it using emscripten.
yarn build:wasm
** key-finder-web * Prerequisites ** yarn
*** Install dependencies
yarn install
*** Build
yarn build:web
*** Serve Locally
yarn serve