Tips on Opus #585
-
Hi All - I'm trying to use opus to enable two way voice communication. I have the bare basic implementation of the codec with a sine wave for test, but am getting very garbled signal. Running on an ESP32. Code is from this blog post from Phil: https://www.pschatzmann.ch/home/2022/05/06/audio-streaming-the-opus-codec/ Only modified to output to my amplifier. Tried various complexities, applications, same result. Very garbled sine wave. Removing encoder/decoder, I get a beautiful sine wave. Is this just what opus does to a sine wave? Or tips on how I can get this sounding right? Thanks in advance!
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I am not sure but encoding and decoding are very expensive operations (which use extensive floating point operations) and maybe you are asking just a little too much from such a slow micro controller. I guess that was the reason why in my test case I used the reduced sample rate of 24000 and limited the channels to 1. In order to confirm this: did you try to decrease (e.g. half) the sample rate ? The esp32 has 2 processors, so if you really need to do both, you could consider to use one processor for encoding and the other for decoding. |
Beta Was this translation helpful? Give feedback.
-
It's too long ago. But post your findings here that others can profit from your investigations |
Beta Was this translation helpful? Give feedback.
I am not sure but encoding and decoding are very expensive operations (which use extensive floating point operations) and maybe you are asking just a little too much from such a slow micro controller. I guess that was the reason why in my test case I used the reduced sample rate of 24000 and limited the channels to 1.
In order to confirm this: did you try to decrease (e.g. half) the sample rate ?
The esp32 has 2 processors, so if you really need to do both, you could consider to use one processor for encoding and the other for decoding.