Skip to content
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

Bugfix/audioservice invalid utterance #1857

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion mycroft/skills/audioservice.py
Expand Up @@ -77,7 +77,7 @@ def queue(self, tracks=None):
self.bus.emit(Message('mycroft.audio.service.queue',
data={'tracks': tracks}))

def play(self, tracks=None, utterance='', repeat=None):
def play(self, tracks=None, utterance=None, repeat=None):
""" Start playback.

Args:
Expand All @@ -90,6 +90,7 @@ def play(self, tracks=None, utterance='', repeat=None):
"""
repeat = repeat or False
tracks = tracks or []
utterance = utterance or ''
if isinstance(tracks, (str, tuple)):
tracks = [tracks]
elif not isinstance(tracks, list):
Expand Down
3 changes: 2 additions & 1 deletion mycroft/skills/common_play_skill.py
Expand Up @@ -122,7 +122,8 @@ def CPS_play(self, *args, **kwargs):
"""
# Inject the user's utterance in case the audio backend wants to
# interpret it. E.g. "play some rock at full volume on the stereo"
kwargs['utterance'] = self.play_service_string
if 'utterance' not in kwargs:
kwargs['utterance'] = self.play_service_string
self.audioservice.play(*args, **kwargs)

def stop(self):
Expand Down