diff --git a/jarvis/skills/entertainement/spotify/spotify.py b/jarvis/skills/entertainement/spotify/spotify.py index f140388..3c8a233 100644 --- a/jarvis/skills/entertainement/spotify/spotify.py +++ b/jarvis/skills/entertainement/spotify/spotify.py @@ -62,7 +62,8 @@ def is_music_playing(): def best_confidence(title, query): - """Find best match for a title against a query. + """ + Find best match for a title against a query. Some titles include ( Remastered 2016 ) and similar info. This method will test the raw title and a version that has been parsed to remove such information. @@ -71,6 +72,8 @@ def best_confidence(title, query): query: query from user Returns: (float) best condidence + + Thanks to @Mycroft source code for this code """ if query == 'None': return SequenceMatcher(None, random_string_generator(5), random_string_generator(5)).ratio() diff --git a/jarvis/utils/client_utils.py b/jarvis/utils/client_utils.py index 6dcf98f..bdff3d9 100644 --- a/jarvis/utils/client_utils.py +++ b/jarvis/utils/client_utils.py @@ -9,6 +9,8 @@ def speak(sentence, client_ip, client_port): if raw_audio_bytes is None: return "Error, audio not valid!" + # TODO: remove when fixed opentts server + print(sentence) play_audio_on_client(raw_audio_bytes, client_ip, client_port)