@@ -33,6 +33,9 @@ class MachineDetectionConfiguration(object):
3333 result will be 'human'. Default is 10 seconds.
3434 speech_end_threshold (float): Amount of silence (in seconds) before
3535 assuming the callee has finished speaking.
36+ machine_speech_end_threshold (float): When an answering machine is
37+ detected, the amount of silence (in seconds) before assuming the
38+ message has finished playing.
3639 delay_result (bool): If set to 'true' and if an answering machine is
3740 detected, the 'answering-machine' callback will be delayed until
3841 the machine is done speaking or until the 'detectionTimeout' is
@@ -57,6 +60,7 @@ class MachineDetectionConfiguration(object):
5760 "silence_timeout" : 'silenceTimeout' ,
5861 "speech_threshold" : 'speechThreshold' ,
5962 "speech_end_threshold" : 'speechEndThreshold' ,
63+ "machine_speech_end_threshold" : "machineSpeechEndThreshold" ,
6064 "delay_result" : 'delayResult' ,
6165 "callback_url" : 'callbackUrl' ,
6266 "callback_method" : 'callbackMethod' ,
@@ -74,6 +78,7 @@ def __init__(self,
7478 silence_timeout = None ,
7579 speech_threshold = None ,
7680 speech_end_threshold = None ,
81+ machine_speech_end_threshold = None ,
7782 delay_result = None ,
7883 callback_url = None ,
7984 callback_method = None ,
@@ -91,6 +96,7 @@ def __init__(self,
9196 self .silence_timeout = silence_timeout
9297 self .speech_threshold = speech_threshold
9398 self .speech_end_threshold = speech_end_threshold
99+ self .machine_speech_end_threshold = machine_speech_end_threshold
94100 self .delay_result = delay_result
95101 self .callback_url = callback_url
96102 self .callback_method = callback_method
@@ -124,6 +130,7 @@ def from_dictionary(cls,
124130 silence_timeout = dictionary .get ('silenceTimeout' )
125131 speech_threshold = dictionary .get ('speechThreshold' )
126132 speech_end_threshold = dictionary .get ('speechEndThreshold' )
133+ machine_speech_end_threshold = dictionary .get ('machineSpeechEndThreshold' )
127134 delay_result = dictionary .get ('delayResult' )
128135 callback_url = dictionary .get ('callbackUrl' )
129136 callback_method = dictionary .get ('callbackMethod' )
@@ -140,6 +147,7 @@ def from_dictionary(cls,
140147 silence_timeout ,
141148 speech_threshold ,
142149 speech_end_threshold ,
150+ machine_speech_end_threshold ,
143151 delay_result ,
144152 callback_url ,
145153 callback_method ,
0 commit comments