Noise in Recorded Files / No Audio
Hi
Recorded Audio Files has just noise, no hearable audio. Sample : 8883e35bc982d07290c9da7ebfa3851b.wav
App Logs for the Call app_logs.txt
Call SDP
v=0
o=- 1795903 1 IN IP4 192.16.12.69
s=-
c=IN IP4 192.16.12.191
t=0 0
m=audio 38048 RTP/AVP 18 0 8 127
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:127 telephone-event/8000
a=label:20
a=sendonly
a=ptime:20
m=audio 38050 RTP/AVP 18 0 8 127
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:127 telephone-event/8000
a=label:10
a=sendonly
a=ptime:20
Looking into it.
The audio has 65% clipped samples - that's the issue. The G.729 decoder is producing values that overflow
Going to fix that now
I should have tested that yesterday, not really using g729 in production. Thanks for identifying this.
Hi @voiceip,
Thank you for the detailed report and especially for providing the audio sample - that was incredibly helpful for diagnosing the issue!
The root cause was identified: the G.729 decoder's fixed codebook gain values were set too high, causing the synthesized audio to exceed the 16-bit PCM range and get hard-clipped. This resulted in the noise and distortion you observed (the sample had about 65% of its samples hitting the clipping limits).
The fix (commit d386c27) addresses this by:
- Reducing the gain table values to proper levels matching G.729 specifications
- Implementing adaptive output scaling that dynamically adjusts based on peak amplitude, ensuring the output stays within proper bounds with headroom
The fix has been deployed to production. Future G.729 recordings should sound clear without the clicking/distortion artifacts.
Thanks again for helping improve the project!