Created
December 5, 2018 21:43
-
-
Save shamangeorge/51620b9b0ea549f3f354a822747fb0ce to your computer and use it in GitHub Desktop.
polly trial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<speak>HOSPITALIZACIONES</speak> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
file_name = "speech.txt" | |
file_cnt = File.read(file_name) | |
voice_name = ARGV[0] | |
cmd = "aws polly synthesize-speech --region us-east-1 --text-type ssml --output-format mp3 hello.mp3 --voice-id #{voice_name} --text '#{file_cnt}'" | |
system(cmd) | |
system("ffplay hello.mp3") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment