MCPcopy Create free account
hub / github.com/livekit/agents / _make_classifier

Function _make_classifier

tests/test_amd_classifier.py:27–47  ·  view source on GitHub ↗
(
    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,
)

Source from the content-addressed store, hash-verified

25
26
27def _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
50def _machine_vm_response(transcript: str = "voicemail greeting") -> FakeLLMResponse:

Calls 2

_AMDClassifierClass · 0.90
FakeLLMClass · 0.85

Tested by

no test coverage detected