CyCoreSystems / audiosocket

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

Artifacts in voice #11

Open SkyWar-design opened 2 years ago

SkyWar-design commented 2 years ago

Hello, I am using Asterisk 18.11.0 and your voice bot application.

I follow your example but play my own wav files, after I pick up the phone, at the very beginning of playing the file I get a "hit" voice artifact, and when I hear the answer in my application and analyze the voice - I also get a "hit" "an example of which I will attach to this appeal

hxKQFDaFpLSjFbc.wav.zip

Ulexus commented 1 year ago

I encountered this, as well. It seems Asterisk's implementation of AudioSocket no longer actually sends SLIN, even though it sends the type byte saying it is.

I worked around this problem by forcing it with the dialed channel instantiation, adding c(slin) to the end, like so:

AudioSocket/127.0.0.1/0549ec21-a181-4339-8ae7-f935be7bb040/c(slin)
nghianv19940 commented 1 month ago

I encountered this, as well. It seems Asterisk's implementation of AudioSocket no longer actually sends SLIN, even though it sends the type byte saying it is.

I worked around this problem by forcing it with the dialed channel instantiation, adding c(slin) to the end, like so:

AudioSocket/127.0.0.1/0549ec21-a181-4339-8ae7-f935be7bb040/c(slin)

Thanks a lot for this info. I need to use Dial to be able to keep dialplan running after audiosocket server hangup. When I use app AudioSocket directly, dialplan ends right away. But use Dial like this makes asterisk send some strange, inaudible audio: Dial(AudioSocket/127.0.0.1/0549ec21-a181-4339-8ae7-f935be7bb040 This is what i use now: Dial(AudioSocket/127.0.0.1/0549ec21-a181-4339-8ae7-f935be7bb040/c(slin))