Comments (1)
The error comes from the encode step, which is encoding uninitialised PCM data. Do you have pcm float data somewhere to encode? If you can't find any; have a look at stream_test.go and testdata/speech_8.wav for how to get PCM data from a .wav file. Another way to generate raw PCM data is shown in utils_test.go; the addSine function will add a sine wave to a set of PCM samples.
Note: PCM data = raw audio samples. Audio is a sequence of air pressure measurements, at very high frequency. You can plot the PCM data in Excel to see the waveform, e.g. #18 (comment) . Opus is a library to turn that waveform into a dense series of bytes, so when you decode it, you get more or less the original waveform back. Have a look at the test files for examples of use, and what kind of data you can pass in.
I'm closing this issue since it's not a bug in the opus wrapper code, but a support ticket. Feel free to ask more questions after you've looked at the test files and we'll see if we can sort this out :)
from opus.
Related Issues (20)
- transfer pcm to opus HOT 2
- run error HOT 2
- Forward error correction flag in decode (decode_fec flag) HOT 9
- How to find sample rate of a stream? HOT 2
- How can I play opus codec audio by using portaudio? HOT 1
- Opus 1.3 release,would we update to new version? HOT 1
- There is a difference between an opus stream (which is an ogg/opus stream) and raw opus data. .opus files are really .ogg files with opus data, which this package doesn't provide a way to write. It does have a reader for it (Stream type), but no writer yet (never bothered to because I haven't needed it so far, but feel free to submit a PR). HOT 2
- transfer pcm to raw opus HOT 7
- "checkptr: unsafe pointer arithmetic" when using go race detector HOT 1
- How to complie in cross platform? HOT 4
- Inconsistent types in README HOT 1
- Amplify ogg stream? HOT 2
- Byte slice to int16 slice. HOT 2
- How to destroy en(de)coder state? HOT 2
- Get audio from microphone and encode to ogg HOT 1
- Strange distortion when decoding HOT 6
- implicit declaration of function 'OPUS_GET_IN_DTX' HOT 8
- Set encoder bitrate HOT 5
- Declare constants as actual const
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opus.