@@ -10,7 +10,7 @@ def current_event() -> Optional[SoundEvent]:
10
10
11
11
Example: ``microphone.current_event()``
12
12
13
- :return: The event, ``SoundEvent('loud')`` or ``SoundEvent('quiet ')``.
13
+ :return: The event, ``SoundEvent('loud')``, ``SoundEvent('quiet')`` or ``SoundEvent('clap ')``.
14
14
"""
15
15
...
16
16
@@ -21,7 +21,7 @@ def was_event(event: SoundEvent) -> bool:
21
21
22
22
This call clears the sound history before returning.
23
23
24
- :param event: The event to check for, such as ``SoundEvent.LOUD`` or ``SoundEvent.QUIET``
24
+ :param event: The event to check for, such as ``SoundEvent.LOUD``, ``SoundEvent.QUIET`` or ``SoundEvent.CLAP``.
25
25
:return: ``True`` if sound was heard at least once since the last call, otherwise ``False``.
26
26
"""
27
27
...
@@ -33,7 +33,7 @@ def is_event(event: SoundEvent) -> bool:
33
33
34
34
This call does not clear the sound event history.
35
35
36
- :param event: The event to check for, such as ``SoundEvent.LOUD`` or ``SoundEvent.QUIET``
36
+ :param event: The event to check for, such as ``SoundEvent.LOUD``, ``SoundEvent.QUIET`` or ``SoundEvent.CLAP``.
37
37
:return: ``True`` if sound was the most recent heard, ``False`` otherwise.
38
38
"""
39
39
...
@@ -50,7 +50,7 @@ def get_events() -> Tuple[SoundEvent, ...]:
50
50
...
51
51
52
52
def set_threshold (event : SoundEvent , value : int ) -> None :
53
- """Set the threshold for a sound event .
53
+ """Set the threshold for the ``LOUD`` or ``QUIET`` sound events .
54
54
55
55
Example: ``microphone.set_threshold(SoundEvent.LOUD, 250)``
56
56
@@ -65,7 +65,7 @@ def set_threshold(event: SoundEvent, value: int) -> None:
65
65
threshold, then the ``SoundEvent.LOUD`` threshold will increase by one unit
66
66
above the ``SoundEvent.QUIET`` threshold.
67
67
68
- :param event: A sound event, such as ``SoundEvent.LOUD`` or ``SoundEvent.QUIET``.
68
+ :param event: A ``SoundEvent.LOUD`` or ``SoundEvent.QUIET`` event .
69
69
:param value: The threshold level in the range 0-255. Values outside this range will be clamped.
70
70
"""
71
71
...
0 commit comments