You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docstrings generation was requested by @JarbasAl.
* #71 (comment)
The following files were modified:
* `__init__.py`
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: JarbasAI <33701864+JarbasAl@users.noreply.github.com>
Copy file name to clipboardExpand all lines: __init__.py
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,14 @@ def initialize(self):
42
42
43
43
@property
44
44
defdefault_listen_mode(self):
45
+
"""
46
+
Determine the default listener mode from the configuration.
47
+
48
+
Selects 'continuous' when the listener's `continuous_listen` setting is true, otherwise selects 'hybrid' when `hybrid_listen` is true, and falls back to 'wakeword' if neither is enabled.
49
+
50
+
Returns:
51
+
str: One of 'continuous', 'hybrid', or 'wakeword' indicating the default listening mode.
Begin a dictation session for the current conversation session.
79
+
80
+
Creates or updates an entry in self.dictation_sessions for the session returned by SessionManager.get(message) with:
81
+
- file_name taken from message.data["name"] if present, otherwise the current timestamp,
82
+
- dictating set to True,
83
+
- an empty dictation_stack.
84
+
85
+
Also emits a bus message to set the recognizer loop mode to "continuous".
86
+
87
+
Parameters:
88
+
message (Message, optional): Incoming message whose .data may contain a "name" key to use as the dictation file name. If omitted, a default Message is used.
Handle the user intent to begin dictation for the current session.
122
+
123
+
Speaks a confirmation dialog ("start") if dictation is not already active for the session, or an "already_dictating" dialog if it is, then enables dictation listening for the session.
124
+
125
+
Parameters:
126
+
message: Bus message containing the intent payload and session information.
Handle a stop-dictation intent by notifying the user and stopping any active dictation.
139
+
140
+
If there is no active dictation for the session, speaks the "stop" dialog; otherwise speaks "not_dictating". Always invokes stop_dictation to ensure dictation is terminated and saved as appropriate.
141
+
142
+
Parameters:
143
+
message: The incoming intent message containing session and intent data.
0 commit comments