[Speex-dev] strange encode/decode results on C54x
Jean-Marc Valin
jean-marc.valin at usherbrooke.ca
Fri Aug 3 07:13:36 PDT 2007
> on the decode side I encoded a voice on a windows machine. I took the
> encoded information and transferred it over to the C54x project and
> decoded it and it didn't sound that great. I watched the decode process
> and it would appear that the first 40 of the 160 words (2 bytes) are all
> 0.
Speex (just like any other speech codec) is stateful and this is the
(*one time*) latency you're seeing. Nothing unusual.
> this means that every 20ms there is 5ms of silence which is what I
> believe is causing our poor decode quality or at the very least an
> indicator that something isn't right.
Yes, it's your code that isn't right. If you're seeing those 40 zeros
every time, it means you're re-initialising the codec for every frame
(or something along those lines).
> the submode is set to 3 so I
> don't think it thinks it's in another mode. I know that the decode on
> the windows machine doesn't do this because the output file for the
> windows machine is continuous data after the first 160 0's. it seems to
> me like it decodes part of it, but then doesn't decode the rest. if you
> would like the encoded file and the output please let me know.
You're not seeing that because you're probably using speexdec on Windows
(which strips those samples away) and comparing to software you wrote on
the C54x.
> on the encode side I encoded a few seconds of voice using my C54x
> platform and tried to decode it on windows. the resulting decode
> produced a voice that sounded much like the C54x decoded voice that was
> encoded by windows (bad). I will provide the encoded data to anyone who
> wants it. I don't notice any pattern of 0's in the decode or anything
> like that. I want to say that it's the sample rate that is causing the
> problems but when the G729A ran at this rate it worked quite well.
No, it's your code that is causing the problem.
> if there is anything that you can do to help I would really appreciate
> it.
Yes, fix it.
Jean-Marc
More information about the Speex-dev
mailing list