File tree 4 files changed +19
-1
lines changed
4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ Conversation options are represented as features. They can be configured from Ap
477
477
| `callback_timeout_hour` | The timeout for a callback in hours. Set 0 to disable. | `int` | 3 |
478
478
| `phone_silence_timeout_sec` | Amount of silence in secs to trigger a warning message from the assistant. | `int` | 20 |
479
479
| `recognition_retry_max` | TThe maximum number of retries for voice recognition. Minimum of 1. | `int` | 3 |
480
+ | `recognition_stt_complete_timeout_ms` | The timeout for STT completion in milliseconds. | `int` | 100 |
480
481
| `recording_enabled` | Whether call recording is enabled. | `bool` | false |
481
482
| `slow_llm_for_chat` | Whether to use the slow LLM for chat. | `bool` | false |
482
483
| `vad_cutoff_timeout_ms` | The cutoff timeout for voice activity detection in milliseconds. | `int` | 250 |
Original file line number Diff line number Diff line change 25
25
answer_hard_timeout_sec ,
26
26
answer_soft_timeout_sec ,
27
27
phone_silence_timeout_sec ,
28
+ recognition_stt_complete_timeout_ms ,
28
29
vad_cutoff_timeout_ms ,
29
30
vad_silence_timeout_ms ,
30
31
)
@@ -260,7 +261,10 @@ async def _response_callback(_retry: bool = False) -> None:
260
261
261
262
# Wait the complete recognition for 50ms maximum
262
263
try :
263
- await asyncio .wait_for (stt_complete_gate .wait (), timeout = 0.05 )
264
+ await asyncio .wait_for (
265
+ stt_complete_gate .wait (),
266
+ timeout = await recognition_stt_complete_timeout_ms (scheduler ) / 1000 ,
267
+ )
264
268
except TimeoutError :
265
269
logger .debug ("Complete recognition timeout, using partial recognition" )
266
270
Original file line number Diff line number Diff line change @@ -139,6 +139,18 @@ async def recognition_retry_max(scheduler: Scheduler) -> int:
139
139
)
140
140
141
141
142
+ async def recognition_stt_complete_timeout_ms (scheduler : Scheduler ) -> int :
143
+ """
144
+ The timeout for STT completion in milliseconds.
145
+ """
146
+ return await _default (
147
+ default = 100 ,
148
+ key = "recognition_stt_complete_timeout_ms" ,
149
+ scheduler = scheduler ,
150
+ type_res = int ,
151
+ )
152
+
153
+
142
154
async def _default ( # noqa: PLR0913
143
155
default : T ,
144
156
key : str ,
Original file line number Diff line number Diff line change @@ -905,6 +905,7 @@ resource configValues 'Microsoft.AppConfiguration/configurationStores/keyValues@
905
905
callback_timeout_hour : 3
906
906
phone_silence_timeout_sec : 20
907
907
recognition_retry_max : 2
908
+ recognition_stt_complete_timeout_ms : 100
908
909
recording_enabled : false
909
910
slow_llm_for_chat : false
910
911
vad_cutoff_timeout_ms : 250
You can’t perform that action at this time.
0 commit comments