Ubuntu Fixes for Google TTS Support #447
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #446.
The primary fix here for Ubuntu is to add the parameter 'sound_converter' which allows the user to specify the program to be used for converting the mp3 files to wav format. In Ubuntu, the name of the ffmpeg program was changed to avconv while still accepting the same flags/parameters. I have left ffmpeg as the default for backwards compatibility for anyone that is currently using this feature.
I also slightly changed the system call to play the sound file generated to be compatible with 'sound_program' parameters that include flags incorporated with the sound program name.
Finally, I used the preexisting voice parameter 'language' to allow the user to select the language of the voice that Google will use to create the audio file.
I really like this feature as a TTS option because it requires no extra software on the part of the user and minimal configuration in MH to get quickly up and running. Thanks to @progeek for the initial commit.