I am sure this has been asked before, so i am appologizing in advance but i haven’t found a solution myself yet, maybe it just isn’t possible.
When someone calls me through my asterisk server from a normal smartphone, is it possible to get 16kzh or better audio input in my EAGI application or is telephony limited to 8khz?
On Thursday 21 November 2024 at 18:20:22, ER404R via Asterisk Community wrote:
When someone calls me through my asterisk server from a normal smartphone,
is it possible to get 16kzh or better audio input in my EAGI application
or is telephony limited to 8khz?
“Telephony” isn’t limited to 8kHz, but your telephone service provider (the
route by which you receive these calls) might be.
The audio quality you end up with is entirely dependent on what’s the best
quality you share with that provider - you can offer 16kHz, and they may say
“no, 8kHz is all we do” or they may say “yes, we can do 16kHz”. The best you
both support is what you’ll get.
It’s all down to the SDP negotiations in the Invites and the OKs.
Antony.
–
The best time to plant a tree is 20 years ago.
The second best time is now.
EAGI forces a transcode to slin (16 bit, 8kHz, signed, linear, mono):
A quick Google found an unofficial patch that allows the codec to be set at run time.
There are two dimensions to telephone audio, as well as the sample rate, there is also whether it is optimised for speech only. I think all mobile phone air interface codecs are speech only,. but many modern phones and networks support 16kHz sampling. Both aspects may be degraded other points along the path, e.g. an ITSP that only supports G.711 will never give you more than 8kHz sampling (3.1kHz audio).
As far as I know wideband PSTN calls trade off quantisation noise for bandwidth, so they can still use 64kbps data rates. Not all counties will support wideband PSTN calls, so the VoIP interface may need to be direct to the cellular network.
That’s for the speech to text functionality. The EAGI dialplan application allows the format to be set using the EAGI_AUDIO_FORMAT dialplan variable[1]. Setting it to “slin16” would be 16kHz signed linear.
It looks like the unofficial patch I found has become official. I looked for the corresponding part of the official source, but obviously didn’t look at the surrounding context properly. That the documentation doesn’t mention this variable didn’t help.