getPeaks() returns an empty array
See original GitHub issueIssue Description
I’m trying to get the peak data of a WAV file so that I can cluster the silences in the audio but the getPeaks()
method returns an empty array.
Any help would be really appreciated.
This is what I have tried so far:
this.player.on("waveReady", (event) => {
var length = this.player.wavesurfer().surfer.getDuration();
var start = 0;
var end = length;
console.log(
this.player.wavesurfer().surfer.backend.getPeaks(length, start, end)
);
});
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
wavesurfer.backend.getPeaks is returning an empty array #1891
below is my code where i was returning the audio peaks in an interval, 3 days ago it was working normally, until yesterday...
Read more >wavesurfer getPeaks is returning an empty array
It works if you remove this line from the config: backend: 'MediaElement',. Working example: $(document).ready(function() { var wavesurfer ...
Read more >p5.js | getPeak() Function - GeeksforGeeks
This function is used to return the array of amplitude peaks in a p5.soundfile that can be used to draw a static waveform....
Read more >Find local maxima - MATLAB findpeaks - MathWorks
This MATLAB function returns a vector with the local maxima (peaks) of the input signal vector, data. ... Create a datetime array using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@thijstriemstra Is there any update?
You shouldn’t check it in the
waveReady
event. Trying your example and pasting this in the console:And I see the peaks data: