Pre Alfa- Making


This Article describe basic setup of Mansi


Step 1: install Ubantu
Step 2: install JAVA
Step 3: Install Netbeans
Step 4: Crate New Project using NetBeans, let me give name myRobo
Step 5: install FSWEbCAM
Step 6: install tractrect
Step 7: Paste Code 1
/***********CODE 1*****************/
Process p1 = Runtime.getRuntime().exec(“fswebcam -r 320×240 –jpeg 100 -D 1 hello.jpg”);
//fswebcam -r 320×240 –jpeg 100 -D 1 hello.jpg
Process p = Runtime.getRuntime().exec(“tesseract hello.jpg out”);
FileReader fr = new FileReader(“out.txt”);
BufferedReader br = new BufferedReader(fr);
String str = br.readLine();
This code will take pic from webcam and convert it into the text. Step 8 describe
Step 8: Download Project AB (Alice for JAVA)
Step 9: Download “espeak”
Step 10: Add “Ab.jar” as Lib.
Paste Code 2 Given below
/*************CODE 2 ********************/
String path= System.getProperty(“user.dir”);
Bot b = new Bot(“super”, path);
Chat c = new Chat(b);
String ans= c.multisentenceRespond(“how are you?”);
/* Write Response to SH file */
FileWriter fw = new FileWriter(“”);
fw.write(“espeak ‘”+ans +”‘”);
/* Call procedure to run .sh file */
Process p = Runtime.getRuntime().exec(“sh “+path+”/”);
Step 11: Now Show Image containing question will produce spoken response.

Share Post