rcbyron / hey-athena-client

Your personal voice assistant
https://heyathena.com
MIT License
421 stars 98 forks source link

Now the tts engine is not interrupted by new commands #64

Closed dimitrisTim closed 6 years ago

dimitrisTim commented 6 years ago

Fixed #61 The tts engine would previously be interrupted, when the user wanted to give a new command. Now this is fixed, by using the pygame Sound class and the media files are .wav and not .mp3.

rcbyron commented 6 years ago

Thanks for submitting the pull request! I'm looking into this issue at the moment to see if this solution will work. If I remember correctly, the TTS engine generates MP3 files so I'm not sure that changing to .wav will be a viable solution. Also the method "play_mp3" in this pull request would need to be renamed to something like "play_wav". Anyway, audio is a tricky thing to get working cross-platform in python. I will get back to you with more info once I have looked into this further.

dimitrisTim commented 6 years ago

Cool, it is my pleasure! I would also like to add some modules, like a Spotify Module for playing music etc. I think there is already an implementation on the browser but I need to check it out. I agree, I will rename the function and the related files who call the function. Let me know it the solution is not working on other platforms. You are also correct about the Google TTS engine, I will check it out and improve my solution.

rcbyron commented 6 years ago

Looks great! I'll merge it in. Also yeah a Spotify module would be awesome. I used the browser implementation originally because the old Spotify api was complicated and basically unusable. There is supposed to be a new api (that plays full tracks, not just previews) released sometime in early 2018 I believe.