question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use `exportPCM` function

See original GitHub issue

Can you please give an example on how to use exportPCMhttps://github.com/katspaugh/wavesurfer.js/blob/gh-pages/dist/wavesurfer.js#L470.

I tried using this way:

    var wavesurfer = Object.create(WaveSurfer);
    options = {
      container: document.querySelector('#waveform'),
      waveColor: 'blue',
      progressColor: 'black',
      waveformHeight: 10,
      cursorColor: 'black',
      normalize: true,
      backend: 'AudioElement',
      height: 150
    };
    wavesurfer.init(options);
    var wavedata = [.....]
    wavesurfer.load('remote url of the video or audio file')
    wavesurfer.on('ready', function() {
        console.log("Wavefrm loaded successfully!!!");
      wavesurfer.exportPCM();
    });

It pops out a new window with blank array.

Please suggest some working example.

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
weavermediacommented, Nov 23, 2016

@cyb-ahmadh How did you get it working?

2reactions
ibnYusratcommented, Jul 24, 2021

Got it working. Thanks

This is one of the worst things a developer can possibly come across.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting PCM data from wavesurfer.js backend/web audio api
There is an exportPCM() function in wavesurfer.js here https://wavesurfer-js.org/docs/methods.html but I'm not sure how this works either. Edit.
Read more >
PCM comments - Forums - IBM Support
We have Python scripts to export PCM data - as you requested in 2nd query. ... up it will only fill up the...
Read more >
WaveSurfer core library class
When using blob type this returns a Promise resolving with an array of Blob instances, one for each canvas. public exportPCM(length: number, accuracy:...
Read more >
Developers - exportPCM has timing issue - - Bountysource
Hi @katspaugh. In the latest version 3.0.0 does the "exportPCM" function work? wavesurfer.on('ready', function() { var pcmData = wavesurfer.
Read more >
Parse a WAV file and export PCM data
raw file. But I am confused about the structure. The code is written as one procedure (LISP style) and there are no functions....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found