Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting raw pcm data from recorded audio #261

Closed
dfavaro opened this issue May 6, 2017 · 5 comments
Closed

Getting raw pcm data from recorded audio #261

dfavaro opened this issue May 6, 2017 · 5 comments

Comments

@dfavaro
Copy link

dfavaro commented May 6, 2017

Can we do it?

@Satys
Copy link

Satys commented May 9, 2017

@dfavaro Did you manage to do this? I have the same need. :)

@dfavaro
Copy link
Author

dfavaro commented May 9, 2017

@Satys Not yet

@muaz-khan
Copy link
Owner

Please check this file:

It may help you export PCM packets or buffers.

var recorder = RecordRTC(audioStream, {
    recorderType: StereoAudioRecorder
});
recorder.startRecording();

recorder.getInternalRecorder().getLeftRightChannels(function(leftChanenls, rightChannels) {
    // do your own stuff here
});

Now modify StereoAudioRecorder.js to add getLeftRightChannels:

// StereoAudioRecorder.js (add anywhere)
this.getLeftRightChannels = funtion(callback) {
    // return any kind of data
    callback(leftChannel, rightChannel);
};

@dfavaro
Copy link
Author

dfavaro commented May 11, 2017

Thank you, i'll try as soon as possible. I'll let you know.

@Satys
Copy link

Satys commented May 15, 2017

@muaz-khan I tried above code and it gives error that,
Uncaught TypeError: Recorder is not a constructor
at initRecorder (RecordRTC.js:86)
at Object.startRecording (RecordRTC.js:67)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants