bbc / audiowaveform

C++ program to generate waveform data and render waveform images from audio files
https://waveform.prototyping.bbc.co.uk
GNU General Public License v3.0
1.94k stars 242 forks source link

WebAssembly support #145

Open thijstriemstra opened 3 years ago

thijstriemstra commented 3 years ago

I was wondering if anyone tried to compile this utility into WebAssembly so it can be run in the browser? or is this not possible? any ideas/pointers are welcome!

chrisn commented 3 years ago

I've never tried this. What is your use case? If you need to create waveform data in the browser, the waveform-data library should work, using Web Audio.

thijstriemstra commented 3 years ago

from the faq:

Note that this approach is generally less efficient than pre-processing the audio server-side, using audiowaveform.

so for large audio files this isn't an option and that's why I'd like to compare the performance of audiowaveform in terminal and browser.

rafeautie commented 8 months ago

@chrisn I have a use case :) Running the library in a supabase edge function. They use deno runtime which supports wasm.

Have you by chance tried this in at any-point in the last 3 years?

chrisn commented 8 months ago

Sorry, no. It's not something I've needed to be able to do.

kesavkolla commented 2 days ago

Inside browser using WASI we can benefit faster generation of waveform data. With WASI build then we can use this C++ library directly inside browser. Currently we are using OPFS to strore large audio+video file. It will be useful to generate the data right there.