Skip to content

Instantly share code, notes, and snippets.

@alitaso345
Created July 17, 2014 00:57
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 alitaso345/9546694a4ba502b0978a to your computer and use it in GitHub Desktop.
Save alitaso345/9546694a4ba502b0978a to your computer and use it in GitHub Desktop.
require 'voicetext'
voice = VoiceText.new('API key')
wav = voice.speaker(:haruka)
.emotion(:happiness, level: :HIGHT)
.pitch(100)
.speed(100)
.volume(100)
.speak('おはようございます')
save_file(wav) #wavファイルをローカルに保存
play_sound(wav) #その場で音声を再生
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment