-
-
Notifications
You must be signed in to change notification settings - Fork 4
fix: mic mute #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
fix: mic mute #176
Conversation
WalkthroughThe update modifies the microphone mute state management in the Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
ovos_dinkum_listener/service.py
(5 hunks)
🧰 Additional context used
🪛 GitHub Actions: Run UnitTests
ovos_dinkum_listener/service.py
[warning] 481-481: DeprecationWarning: reference self.status.state
instead
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: install (3.11)
- GitHub Check: install (3.10)
🔇 Additional comments (7)
ovos_dinkum_listener/service.py (7)
183-183
: Good addition of temporary mute state tracking.Adding the
_tmp_muted
instance variable provides a clear way to preserve the microphone state during audio output events, which will help maintain consistency in mute state management.
402-402
: Unified stop handling with recording stop functionality.Replacing the
_handle_stop
handler with_handle_stop_recording
for the 'mycroft.stop' event streamlines the codebase by consolidating related functionality under a single method.
791-791
: Improved mute state visibility.Adding logging when the microphone is muted provides better observability of the system state during operation.
799-799
: Improved toggle mute state logging.Adding logging for the mute toggle action helps with debugging and understanding the system state.
839-841
: Enhanced audio output start mute state management.Storing the current mute state before applying muting during audio output is a good practice that ensures the system can return to its previous state. The added debug logging also improves visibility.
846-848
: Robust audio output end mute state restoration.The implementation correctly restores the previous mute state after audio output ends and resets the temporary variable. The fallback to
False
when_tmp_muted
isNone
ensures consistent behavior.
891-893
: Improved stop recording handler with state verification.Adding an early return when not in recording state prevents unnecessary operations and potential side effects when stopping recording is not applicable.
Summary by CodeRabbit
New Features
Bug Fixes