Last active
August 29, 2015 14:20
-
-
Save KazukoShikiya/ddd9c2d6565e9a12a215 to your computer and use it in GitHub Desktop.
4/28のPepperくんイベントで試したソースコード
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
import com.aldebaran.qi.Application; | |
import com.aldebaran.qi.Session; | |
import com.aldebaran.qi.helper.proxies.*; | |
public class HelloPepper { | |
public static void main(String[] args) throws Exception { | |
Application app = new Application(args,"tcp://pepper.local:9559"); | |
try { | |
app.start(); | |
Session session = app.session(); | |
ALTextToSpeech tts = new ALTextToSpeech(session); | |
tts.setLanguage("Japanese"); | |
tts.say("Java女子部だー"); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
} |
"tcp://pepper.local:9559"の部分を、実機orバーチャルロボットに書き換えて実行します。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
com.aldebaran.qi.*のためのjarは、4/28現在、一般公開されていません。
コンパイル・実行には、32bit版のjreが必要でした。
Bonjourがインストールされていない場合は、PepperのIPアドレスで通信するように書き換えます。