nadirhamid / asterisk-audiofork

Stream Asterisk audio over Websockets
GNU General Public License v2.0
159 stars 62 forks source link

Audio quality #28

Open jmurn opened 1 year ago

jmurn commented 1 year ago

Is it possible to set the audio to a higher bitrate, like slin16 (16-bit 16kHz)? Whether I use codecs like alaw or g722, I always get slin audio format (16-bit 8kHz). For my use case, I need a higher bitrate, and real-time upscaling is a bit tricky

nadirhamid commented 12 months ago

Hello @jmurn,

Thanks for your message!

We are currently using 8000 sample rate and it is hard coded, although it may be possible to change this by creating another parameter. The parameter in turn would be used in place of the current sampling rate. However, it has not been tested with any other sample rates, so I don't know if it will work or not.

I can create a feature branch and test this out.

P.S: if your wondering where this sample rate is hard coded you can refer to this link https://github.com/nadirhamid/asterisk-audiofork/blob/master/app_audiofork.c#L748

I will get back to you once a change like this gets implemented.

If you have any other questions or need more info let me know.