[opus] High noise after encoding/decoding procedure

Ralph Giles giles at thaumas.net
Tue Jul 12 17:46:09 UTC 2016


On 2016-07-12 9:34 AM, Aleksandr Mikoff wrote:

> If I encode each frame, decode it and send it back to the speakers I
> hear a very noisy signal - it is so large, so it is almost impossible to
> distinguish words in my speech...

This effect can be caused by some data type issues:

 - If you are using opus_encode() and opus_decode(), make sure to use
16-bit signed integer samples in the pcm buffer. If you have 8-bit
samples you'll have to convert them.
 - Make sure you're passing the length of the pcm buffer in _samples_
not _bytes_.
 - Make sure you're passing the size of the compressed opus data in _bytes_.

> Is it ok, that I changed few parameters in "defines.h" file (to
> suppress the RAM requirements - I have only 60 KB RAM free on my STM32
> board)? I changed the ENCODER_NUM_CHANNELS 1 and DECODER_NUM_CHANNELS to
> one, and MAX_FS_KHZ to 8.

That's not a tested configuration, so it's possible this broke
something. If you make the same changes and build for a desktop target,
does audio round-trip through opus_demo correctly?

 -r



More information about the opus mailing list