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

Configurations used to create raw opus packet #39

Open
SowmiyaMurugasamy opened this issue Jan 4, 2023 · 1 comment
Open

Configurations used to create raw opus packet #39

SowmiyaMurugasamy opened this issue Jan 4, 2023 · 1 comment

Comments

@SowmiyaMurugasamy
Copy link

What is the configuration used (like number of channels, bitrate, sample rate) for the raw opus packet provided in the example folder?

We have a stream of 16-bit PCM data, which we have converted to raw opus packet using lipopus and tried to convert it to PCM using this library.

We have also tried decodeAudioData on the Ogg pages created from 16-bit PCM data using lipopusenc.

Configuration used for our sample is

  • Number of channels - 1
  • Sample rate - 48000
  • Bit Rate - 64000

In both the above cases, we are getting the following error on decodeAudioData.

DOMException: Failed to execute 'decodeAudioData' on 'BaseAudioContext': Unable to decode audio data

Any help would be appreciated. @samirkumardas

@samirkumardas
Copy link
Owner

To decode data, bit rate, and sample rate are not necessary. Those are required to play the decoded PCM data
The sample rate is given by the decoder. I forgot about the sample rate of the example data. You can debug the PCM player by playing the sample file to get all parameters.

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

2 participants