TALK_DETECT volume threshold adjustment and LiveRecording file params

Hello,

I am working on a stasis nodejs IVR application.

I have set TALK_DETECT in the dialplan before the Stasis(), as below, which did enable me to set “channel.on(‘ChannelTalkingStarted’, gotTalkStart)” successfully, and I am getting the events.

However, it seems that my system is very sensitive to noise, and I would like to adjust to only detect the talking about a certain volume threshold. A “certain AI applicatilon” advised that I can set values for “Voice Activity Detection” in the pjsip config, but I do not see any such option anywhere in Freepbx 16, so perhaps the AI is out to lunch…

As a second related topic, once I detect speech and start recording I see that am getting files like

RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz

You can see below that I thought that setting set(FILE()) valuse might help, but it did not.

Any help would be appreciated on these items.

Thank you
Mattis

exten => 1003,1,NoOp(entering ${CONTEXT} as defined in extensions_custom.conf)
same => n,Set(DENOISE(rx)=on)
same => n,Set(TALK_DETECT(set)=1800,2000) ; Perform talk detection on the denoised received audio
same => n, Set(FILE(codec)=wav)
same => n, Set(FILE(audioformat)=wav)
same => n, Set(FILE(samplerate)=44100)
same => n, Set(FILE(bitrate)=256000)
same => n,Answer()
same => n,Stasis(srec, 2350)

Where is that version of FILE documented. Even in 21 it is for text files.

The RIFF format you quote is the only one supported for the wav format.

If you want higher bandwidth uncompressed audio, you will need to use raw slinxx formats. I can’t remember if there is one for 44,100. I can’t think why anyone would want to record telephone speech at that quality, given that standard PSTN has 3.1kHz bandwidth and even enhanced quality formats are no more than 7kHz, so slin16 will better anything that you are likely to receive.

david55,

Thank you very much for your reply, and for your indulgence in tolerating my ignorance.

Since you ask “Where is that version of FILE documented.” I am embarrassed but amused to note that after failing to find an example on-line, I turned to ChatGPT 3.5 which apparently pulled these settings out of its asterisk. I am duly chastened. (I had asked “in asterisk how to improve the quality of LiveRecording recordings”)

On my first topic, if you, or anyone, might have a hint as to why I get seem to randomly get a ChannelTalkingStarted event on a low hum, and then not get it on a loud utterance,and then work perfectly well, etc, all in the same call, feel free to humble me on this topic as well.

regards, and thanks again,
Mattis

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.