TALK_DETECT检测用户说话函数

Raises notifications when Asterisk detects silence or talking on a channel.

Description

The TALK_DETECT function enables events on the channel it is applied to. These events can be emitted over AMI, ARI, and potentially other Asterisk modules that listen for the internal notification.

The function has two parameters that can optionally be passed when set on a channel: dsp_talking_threshold and dsp_silence_threshold.

dsp_talking_threshold is the time in milliseconds of sound above what the dsp has established as base line silence for a user before a user is considered to be talking. By default, the value of silencethreshold from dsp.conf is used. If this value is set too tight events may be falsely triggered by variants in room noise.

Valid values are 1 through 2^31.

dsp_silence_threshold is the time in milliseconds of sound falling within what the dsp has established as baseline silence before a user is considered be silent. If this value is set too low events indicating the user has stopped talking may get falsely sent out when the user briefly pauses during mid sentence.

The best way to approach this option is to set it slightly above the maximum amount of ms of silence a user may generate during natural speech.

By default this value is 2500ms. Valid values are 1 through 2^31.

你可能感兴趣的:(asterisk,asterisk)