-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
deprecates #2118 |
you are wrong pep8 bot travis says mycroft/skills/fallback_skill.py:65:36: E128 continuation line under-indented for visual indent |
Yay this I can review and include :) |
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.
The pep-8 things need to be fixed. I do think the CLI by default should show all interactions since it's used for debugging. Maybe an option to disable that? CLI should also produce audio by default.
Will look into the details later this week/weekend but it looks like the old PR but a bit more advanced. 👍
since this only makes sense (in my opinion) when debugging, why not simply check for the "debug" flag already present in the .conf ? if i'm writing a query i'm also reading the response, if I'm speaking i'm not reading... unless we are debugging like you said other option would be to identify the source in the cli interface itself, something like
|
Tested and seems to be working as intended. The code looks excellent from what I've seen (apart from the pep issues) I want the cli to view the utterances from the speech client and utterance entered on the cli to be outputted as audio. The CLI is first and foremost intended as a debug tool and removing this makes it a lot less useful. It looks to me like the changes to the Message.reply() method should be backwards compatible so we don't need to hold off waiting for the 20.02 release. (Although this thursdays release may be the last of 19.08.) |
|
||
|
||
def handle_no_internet(): | ||
LOG.debug("Notifying enclosure of no internet connection") | ||
bus.emit(Message('enclosure.notify.no_internet')) | ||
context = {'client_name': 'mycroft_listener', | ||
'source': 'audio'} |
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.
very minor nitpick, and not used in practice, but should i set destination here as "enclosure"?
when using self.speak inside a scheduled event the message.context was lost, added the option to pass the message context this allows things like common_XXX to forward messages correctly MycroftAI/skill-query#8 MycroftAI/skill-playback-control#28 |
Ok I have some weirdness on my Desktop machine, seem to work on my laptop but I get no speech on my desktop. Will dig and see if I have some weird config set. |
event.context = event.context or {} | ||
if event.context.get('destination') and \ | ||
('debug_cli' in event.context['destination'] or | ||
'audio' in event.context['destination']): |
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.
should this be
if event.context.get('destination') and \
('debug_cli' not in event.context['destination'] or
'audio' not in event.context['destination']):
That change seems to make the PR work for me.
This looks good now I think. Do you think you could rebase it and squash the pep-8 fixes and the logic fixes into the relevant main commits to clean up the commit history a bit? |
Rebased, and ready to merge! Thanks @JarbasAI, awesome work! |
I could swear i made this PR before, but could not find it so here it goes again.
This is needed for the hive mind
Description
The speech handling now checks the message context if it's the intended target for the message and will only speak in the following conditions:
The idea is that for example when the android app is used to access Mycroft the device at home shouldn't start to speak.
Targeting Theory
The context target parameter in the original message can be set to list with any number of intended targets:
A missing destination or if the destination is set to None is interpreted as a multicast and should trigger all output capable processes (be it the mycroft-audio process, a web-interface, the KDE plasmoid or maybe the android app)
Messages
Inside mycroft-core
How to test