How can I make bbc/audiowaveform peaks match wavesurfer.js'? #2769
-
Taking the recommendation from the the wavesurfer website, I'm attempting to pre-generate the peaks using bbc/audiowaveform. The peaks do load much faster, but I'm unable to find the right parameters that make them look the same as wavesurfer.js' peaks. For reference, here's what they look like using bbc/audiowaveform and normalizing using the Python script: I'm using all the default settings on both wavesurfer.js and bbc/audiowaveform. Any hints would be greatly appreciated. The benefits are clearly there in terms of load times but I lose a ton of fidelity, so might as well use the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Wavesurfer does a max value sampling, so waveforms tends to look fat when the data has outliers. If it doesn't help, try smoothening the data by averaging the values (don't run the Python script in this case):
|
Beta Was this translation helpful? Give feedback.
-
This looks a lot better! I did have to add the |
Beta Was this translation helpful? Give feedback.
Wavesurfer does a max value sampling, so waveforms tends to look fat when the data has outliers.
Setting a lower sample rate might help (try passing
--pixels-per-second 1
to audiowaveform).If it doesn't help, try smoothening the data by averaging the values (don't run the Python script in this case):