(
llm: FakeLLM | None = None,
*,
human_speech_threshold: float = 2.5,
human_silence_threshold: float = 0.1,
machine_silence_threshold: float = 0.3,
no_speech_threshold: float = 10.0,
timeout: float = 10.0,
wait_until_finished: bool = False,
max_endpointing_delay: float = 6.0,
)
| 25 | |
| 26 | |
| 27 | def _make_classifier( |
| 28 | llm: FakeLLM | None = None, |
| 29 | *, |
| 30 | human_speech_threshold: float = 2.5, |
| 31 | human_silence_threshold: float = 0.1, |
| 32 | machine_silence_threshold: float = 0.3, |
| 33 | no_speech_threshold: float = 10.0, |
| 34 | timeout: float = 10.0, |
| 35 | wait_until_finished: bool = False, |
| 36 | max_endpointing_delay: float = 6.0, |
| 37 | ) -> _AMDClassifier: |
| 38 | return _AMDClassifier( |
| 39 | llm or FakeLLM(), |
| 40 | human_speech_threshold=human_speech_threshold, |
| 41 | human_silence_threshold=human_silence_threshold, |
| 42 | machine_silence_threshold=machine_silence_threshold, |
| 43 | no_speech_threshold=no_speech_threshold, |
| 44 | timeout=timeout, |
| 45 | wait_until_finished=wait_until_finished, |
| 46 | max_endpointing_delay=max_endpointing_delay, |
| 47 | ) |
| 48 | |
| 49 | |
| 50 | def _machine_vm_response(transcript: str = "voicemail greeting") -> FakeLLMResponse: |
no test coverage detected