Last active
August 29, 2015 14:13
-
-
Save ksasao/81f5af2eaa36652b8d6d to your computer and use it in GitHub Desktop.
Windowsのコマンドプロンプトから文字列を入力してPepperにしゃべらせるサンプル。Pepper用のPythonライブラリについては http://qiita.com/Atelier-Akihabara/items/3289e60985586b8da709 を参照。License: WTFPL
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 -*- | |
from naoqi import ALProxy | |
animSpeech = ALProxy('ALAnimatedSpeech', "192.168.1.10", 9559) | |
while 1: | |
data = raw_input() | |
p = unicode(data, 'shift-jis').encode('utf-8') | |
sentence = "\RSPD="+ str( 100 ) + "\ " | |
sentence += "\VCT="+ str( 120 ) + "\ " | |
sentence += str(p) | |
sentence += "\RST\ " | |
configuration ={"bodyLanguageMode":"contextual"} | |
animSpeech.post.say(str(sentence), configuration) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment