Rui,
Then if I understand the motivation here,
the audio is going to be fed to a speech to text to be later evaluated for response.
Hi Mike,
Yes, was in the process of trainin an STT tailored for telephone/ham, untill I hit the stage I need to interface with asl3. I could do the whole loopback thing but it's not the purpose on the long road, it'll mean it needs to run locally.
I managed to patch res_audiosocket and fix (is it really a fix !?) the channel state to app_rpt liking, and another bug that happened along (channel name, which is used to retrieve the channel later on, app_rpt saves in one format while audiosocket declares its channel name in another, so never found him for processing), but now hit another one, when connecting nodes, I'm guessing app_rpt expects a stream of packets as soon as it connects regardles of having audio or not, which audiosocket doesn't send because well, there's no audio right away, I need to do some more digging.
I did notice that it was somewhat companded in the brief look over.
Perhaps you can set a small stream as sort of a heartbeat ? Later ignored.
If you are still using slin, make sure app_rpt has the codec and is available in the other channels it may create. Or try switching to ulaw till you get it working.
If you are making system calls, make sure the codec used is available in the OS.
I always try to use ulaw, the examples in the thread with slin were a reminescent of some old attempts, I'm favouring ulaw since the start.
Thanks for all the help Mike, much appreciated!!
Hello, just a heads up.
I managed to get AudioSocket channel working, although I had to do some changes and add some features to AudioSocket implementation.
I'm currently using a custom asterisk install with my changed audiosocket implementation and my server, all is working, apart from some audio conversions happening, apparently AudioSocket expects slin receives, it's hardcoded, the codec selection in the channel definition in rxchannel is just for sending audio, thus right now it's all working with slin (tx/rx) but there's still some choppiness here and there, I might add the feature to use the selected codec everywhere (tx and rx).
Nevertheless, it's possible, but, only with the following modifications to AudioSocket (which I'll propose later on to be added to mainstream asterisk)
- As soon as connection is established (call) it should set channel state up
- the channel name registered in asterisk must be the same defined in rxchannel, app_rpt uses that name to retrieve the channel later on for processing
- PTT must be implemented, the channel driver itself requires it, thus, I had to add a new packet type, 0x04 for PTT, size 1, data 1 or 0, PTT on or off.
When I get some time for this, I'll setup the git fork to add these changes and do a pull request on the mainstream, although, I guess it'll take a while to be implemented in stable ASL3 since mainstream asterisk is quite ahead.
Best regards,