mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-12 04:48:51 +00:00
Merge "app_amd: Correct maximum_number_of_words functionality & documentation"
This commit is contained in:
10
UPGRADE.txt
10
UPGRADE.txt
@@ -64,5 +64,15 @@ AMI:
|
|||||||
Commands that fail to execute (no such command, invalid syntax etc.) now
|
Commands that fail to execute (no such command, invalid syntax etc.) now
|
||||||
return an Error response instead of Success.
|
return an Error response instead of Success.
|
||||||
|
|
||||||
|
app_amd:
|
||||||
|
- The 'maximum_number_of_words' configuration option and parameter to the AMD
|
||||||
|
application previously did not match the documented functionality + variable
|
||||||
|
name. In Asterisk 13, a value of '3' would mean that if '3' words were detected,
|
||||||
|
the result would be detection as a 'MACHINE'. As of this version, the value
|
||||||
|
reflects the maximum words that if EXCEEDED (rather than reached), would
|
||||||
|
result in detection as a machine. This means that you should update this
|
||||||
|
value to be one higher than your previos value, if your previous value
|
||||||
|
was working well for you.
|
||||||
|
|
||||||
===========================================================
|
===========================================================
|
||||||
===========================================================
|
===========================================================
|
||||||
|
|||||||
@@ -62,19 +62,19 @@ ASTERISK_REGISTER_FILE()
|
|||||||
<syntax>
|
<syntax>
|
||||||
<parameter name="initialSilence" required="false">
|
<parameter name="initialSilence" required="false">
|
||||||
<para>Is maximum initial silence duration before greeting.</para>
|
<para>Is maximum initial silence duration before greeting.</para>
|
||||||
<para>If this is exceeded set as MACHINE</para>
|
<para>If this is exceeded, the result is detection as a MACHINE</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="greeting" required="false">
|
<parameter name="greeting" required="false">
|
||||||
<para>is the maximum length of a greeting.</para>
|
<para>is the maximum length of a greeting.</para>
|
||||||
<para>If this is exceeded set as MACHINE</para>
|
<para>If this is exceeded, the result is detection as a MACHINE</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="afterGreetingSilence" required="false">
|
<parameter name="afterGreetingSilence" required="false">
|
||||||
<para>Is the silence after detecting a greeting.</para>
|
<para>Is the silence after detecting a greeting.</para>
|
||||||
<para>If this is exceeded set as HUMAN</para>
|
<para>If this is exceeded, the result is detection as a HUMAN</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="totalAnalysis Time" required="false">
|
<parameter name="totalAnalysis Time" required="false">
|
||||||
<para>Is the maximum time allowed for the algorithm</para>
|
<para>Is the maximum time allowed for the algorithm</para>
|
||||||
<para>to decide HUMAN or MACHINE</para>
|
<para>to decide on whether the audio represents a HUMAN, or a MACHINE</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="miniumWordLength" required="false">
|
<parameter name="miniumWordLength" required="false">
|
||||||
<para>Is the minimum duration of Voice considered to be a word</para>
|
<para>Is the minimum duration of Voice considered to be a word</para>
|
||||||
@@ -85,14 +85,14 @@ ASTERISK_REGISTER_FILE()
|
|||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="maximumNumberOfWords" required="false">
|
<parameter name="maximumNumberOfWords" required="false">
|
||||||
<para>Is the maximum number of words in a greeting</para>
|
<para>Is the maximum number of words in a greeting</para>
|
||||||
<para>If this is exceeded set as MACHINE</para>
|
<para>If this is exceeded, then the result is detection as a MACHINE</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="silenceThreshold" required="false">
|
<parameter name="silenceThreshold" required="false">
|
||||||
<para>How long do we consider silence</para>
|
<para>What is the average level of noise from 0 to 32767 which if not exceeded, should be considered silence?</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="maximumWordLength" required="false">
|
<parameter name="maximumWordLength" required="false">
|
||||||
<para>Is the maximum duration of a word to accept.</para>
|
<para>Is the maximum duration of a word to accept.</para>
|
||||||
<para>If exceeded set as MACHINE</para>
|
<para>If exceeded, then the result is detection as a MACHINE</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
</syntax>
|
</syntax>
|
||||||
<description>
|
<description>
|
||||||
@@ -130,7 +130,7 @@ ASTERISK_REGISTER_FILE()
|
|||||||
</value>
|
</value>
|
||||||
<value name="MAXWORDS">
|
<value name="MAXWORDS">
|
||||||
Word Count - maximum number of words.
|
Word Count - maximum number of words.
|
||||||
</value>
|
</value>
|
||||||
</variable>
|
</variable>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</description>
|
</description>
|
||||||
@@ -154,7 +154,7 @@ static int dfltAfterGreetingSilence = 800;
|
|||||||
static int dfltTotalAnalysisTime = 5000;
|
static int dfltTotalAnalysisTime = 5000;
|
||||||
static int dfltMinimumWordLength = 100;
|
static int dfltMinimumWordLength = 100;
|
||||||
static int dfltBetweenWordsSilence = 50;
|
static int dfltBetweenWordsSilence = 50;
|
||||||
static int dfltMaximumNumberOfWords = 3;
|
static int dfltMaximumNumberOfWords = 2;
|
||||||
static int dfltSilenceThreshold = 256;
|
static int dfltSilenceThreshold = 256;
|
||||||
static int dfltMaximumWordLength = 5000; /* Setting this to a large default so it is not used unless specify it in the configs or command line */
|
static int dfltMaximumWordLength = 5000; /* Setting this to a large default so it is not used unless specify it in the configs or command line */
|
||||||
|
|
||||||
@@ -367,7 +367,7 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
|
|||||||
sprintf(amdCause , "MAXWORDLENGTH-%d", consecutiveVoiceDuration);
|
sprintf(amdCause , "MAXWORDLENGTH-%d", consecutiveVoiceDuration);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (iWordsCount >= maximumNumberOfWords) {
|
if (iWordsCount > maximumNumberOfWords) {
|
||||||
ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: iWordsCount:%d\n", ast_channel_name(chan), iWordsCount);
|
ast_verb(3, "AMD: Channel [%s]. ANSWERING MACHINE: iWordsCount:%d\n", ast_channel_name(chan), iWordsCount);
|
||||||
ast_frfree(f);
|
ast_frfree(f);
|
||||||
strcpy(amdStatus , "MACHINE");
|
strcpy(amdStatus , "MACHINE");
|
||||||
|
|||||||
@@ -3,17 +3,25 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
initial_silence = 2500 ; Maximum silence duration before the greeting.
|
|
||||||
; If exceeded then MACHINE.
|
|
||||||
greeting = 1500 ; Maximum length of a greeting. If exceeded then MACHINE.
|
|
||||||
after_greeting_silence = 800 ; Silence after detecting a greeting.
|
|
||||||
; If exceeded then HUMAN
|
|
||||||
total_analysis_time = 5000 ; Maximum time allowed for the algorithm to decide
|
total_analysis_time = 5000 ; Maximum time allowed for the algorithm to decide
|
||||||
; on a HUMAN or MACHINE
|
; on whether the audio represents a HUMAN, or a MACHINE
|
||||||
|
silence_threshold = 256 ; If the average level of noise in a sample does not reach
|
||||||
|
; this value, from a scale of 0 to 32767, then we will consider
|
||||||
|
; it to be silence.
|
||||||
|
|
||||||
|
; Greeting ;
|
||||||
|
initial_silence = 2500 ; Maximum silence duration before the greeting.
|
||||||
|
; If exceeded, then the result is detection as a MACHINE.
|
||||||
|
after_greeting_silence = 800 ; Silence after detecting a greeting.
|
||||||
|
; If exceeded, then the result is detection as a HUMAN
|
||||||
|
greeting = 1500 ; Maximum length of a greeting. If exceeded, then the
|
||||||
|
; result is detection as a MACHINE.
|
||||||
|
|
||||||
|
; Word detection ;
|
||||||
min_word_length = 100 ; Minimum duration of Voice to considered as a word
|
min_word_length = 100 ; Minimum duration of Voice to considered as a word
|
||||||
|
maximum_word_length = 5000 ; Maximum duration of a single Voice utterance allowed.
|
||||||
between_words_silence = 50 ; Minimum duration of silence after a word to consider
|
between_words_silence = 50 ; Minimum duration of silence after a word to consider
|
||||||
; the audio what follows as a new word
|
; the audio what follows as a new word
|
||||||
maximum_number_of_words = 3 ; Maximum number of words in the greeting.
|
|
||||||
; If exceeded then MACHINE
|
maximum_number_of_words = 2 ; Maximum number of words in the greeting
|
||||||
maximum_word_length = 5000 ; Maximum duration of a single Voice utterance allowed.
|
; If exceeded, then the result is detection as a MACHINE
|
||||||
silence_threshold = 256
|
|
||||||
|
|||||||
Reference in New Issue
Block a user