Skip to content

Instantly share code, notes, and snippets.

@shamangeorge
Created December 5, 2018 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamangeorge/51620b9b0ea549f3f354a822747fb0ce to your computer and use it in GitHub Desktop.
Save shamangeorge/51620b9b0ea549f3f354a822747fb0ce to your computer and use it in GitHub Desktop.
polly trial
<speak>HOSPITALIZACIONES</speak>
#!/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