Closed dimitrisTim closed 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.
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.
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.
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.