CyCoreSystems / audiosocket

Simple bidirectional audio protocol
Apache License 2.0
67 stars 35 forks source link

audio received has artifacts at the start of the audiosocket starting and intermittently #21

Closed booleys1012 closed 5 months ago

booleys1012 commented 5 months ago

Asterisk Version: 18.12.1

Audiosocket application is started by dialplan and the caller (cell phone) interacts with the downstream application. Capturing the audio from the downstream application (slin,16b, 8000hz, single-channel) is showing bad audio data intermittently but the bad audio starts/stops in clear time-windows (see image), but perfectly clean audio from my voice/cellphone at other times. This is all during a continuous AudioSocket session from a call and dialplan perspective.

The application is able to feed similarly-encoded data (text to speech generated) back to the connection and the audio is played clearly back to caller every time and repeatedly during the same call with issues.

The attached image contains 3 separate calls, all exhibiting similar behavior but at different times. One example call is included, which is signed 16-bit PCM, 1 channel, 8000Hz.

audiosocket_calls audiosocket_cellphone.zip

booleys1012 commented 5 months ago

Considering this as a high possibility ( https://github.com/asterisk/asterisk/issues/234 ), and realize that the issue, if anywhere would lie in the C code, which is not this repository any longer. Nonetheless any advice would be appreciated

booleys1012 commented 5 months ago

cancelled -- the high CPU of #234 above is relevant, but the mix-up was that packet byte length is big-endian while audio is little endian