-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix:improve stop #260
fix:improve stop #260
Conversation
also stop ongoing TTS partial fix, TODO in code for later
WalkthroughThe changes in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #260 +/- ##
==========================================
- Coverage 53.41% 51.48% -1.93%
==========================================
Files 37 36 -1
Lines 4362 4195 -167
==========================================
- Hits 2330 2160 -170
- Misses 2032 2035 +3 ☔ View full report in Codecov by Sentry. |
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: 0
🧹 Outside diff range and nitpick comments (3)
ovos_workshop/skills/ovos.py (3)
1240-1245
: Approved with suggestions for improvementThe addition of the audio stop message for the default session is a good improvement. However, consider the following suggestions:
- Add a more detailed comment explaining why we only stop audio for the "default" session.
- The TODO comment about tracking speech origin should be addressed in future updates.
Consider adding a more detailed comment like this:
# Stop audio playback only for the default session # This ensures we don't interfere with other active sessions if data["result"] and sess.session_id == "default": # TODO: Implement proper tracking of speech origin per skill self.bus.emit(message.reply("mycroft.audio.speech.stop", {"skill_id": self.skill_id}))
1256-1256
: Approved with a suggestion for readabilityThe modification to include both
stop_session
andstop
methods in the stop handling logic is a good improvement. It ensures that both session-specific and general stop actions are performed.Consider refactoring the line for better readability:
stopped = self.stop_session(sess) or self.stop() or FalseThis change maintains the same logic but makes it easier to understand at a glance.
1240-1245
: Approved with suggestion for improved deprecation warningThe addition of the
network_requirements
property for backwards compatibility is a good practice. However, to ensure developers are well-informed about the deprecation, consider using thewarnings
module.Consider modifying the implementation to use the
warnings
module:import warnings @classproperty def network_requirements(self) -> RuntimeRequirements: warnings.warn("network_requirements is deprecated and will be removed in ovos-core 0.0.8. " "Use runtime_requirements instead.", DeprecationWarning, stacklevel=2) return self.runtime_requirementsThis change will provide a more visible deprecation warning to developers using this property.
Works for me! |
also stop ongoing TTS
partial fix, TODO in code for later
related OpenVoiceOS/ovos-skill-wikihow#18
Summary by CodeRabbit
New Features
Bug Fixes
Refactor