Silence detection in RECORD FILE

I am using the RECORD FILE agi function with a specified silence timeout to obtain a .wav file which my agi script then sends off to an external ASR service. In some cases calls are received with very poor SNR, so I would like to better understand exactly how Asterisk detects “silence”.

confbridge.conf.sample says that dsp_talking threshold is a magnitude threshold that is potentially adjustable, however does this only apply in the ConfBridge application, or more generally?

The documentation in func_talkdetect.c says that dsp_talking_threshold is a time in milliseconds rather than a signal level threshold.

The actual signal level threshold used appears to be dsp->threshold in dsp.c but it’s not clear what parameter in which config file can be used to alter this value.

Any help would be greatly appreciated.

Each “subsystem” (app_confbridge, func_talkdetect, agi) create, and manage their own dsp object. This means setting a parameter in one will not affect the other.

You can however, set the silencethreshold option in the dsp.conf file, which is the default initial value used by each subsystem. So setting this potentially affects all of them unless otherwise overridden (for instance, by setting the talking_threshold values in something like app_confbridge or func_talkdetect). Setting this value essentially sets the minimum average magnitude threshold to determine talking by the DSP.

For your use in the RECORD FILE agi function it appears you can only set the number of seconds of silence allowed before stopping the recording. The level at which silence though is detected by the dsp can only be set via the aforementioned silencethreshold option in dsp.conf. Again please note setting that value there sets the default for all subsystem uses.

Thanks. I guess I was misled by the comment in dsp.conf.sample which says that silencethreshold is a time interval, not a signal-level threshold.

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