Created
July 10, 2014 14:25
-
-
Save willnet/7b2e310a5aabf9fd929c to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
require 'voice_text_api' | |
require 'tempfile' | |
# https://github.com/tdtds/voice_text_api | |
vt = VoiceTextAPI.new('YOUR_API_KEY') | |
# wav = vt.tts('隣の客はよく柿食う客だ', :haruka, emotion: :happiness) | |
wav = vt.tts('隣の客はよく柿食う客だ', :haruka, emotion: :anger, emotion_level: 2) | |
Tempfile.open('test-text-api') do |file| | |
file.write wav | |
system("afplay #{file.path}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment