image
image

Go Back   macosx.com > Community > Bob's Place

Reply
 
Thread Tools
  #1  
Old June 15th, 2002, 10:26 AM
_____________________
 
Join Date: Aug 2001
Posts: 1,542
Thanks: 0
Thanked 0 Times in 0 Posts
tagliatelle is on a distinguished road
Speechtechnology Organisation

Scansoft
Philips Speech Processing
IBM ViaVoice - IBM Human Language Technologies
Babel Tech
Nuance Communications
Speech Works
Microsoft's SAPI
Java Speech API
import java.awt.*;
import java.applet.AudioClip;

public class SpraakHERVE extends javax.swing.JApplet
implements Runnable {

AudioClip[] s = new AudioClip[8];
AudioClip h1;
AudioClip h2;
int sum, num1, num2;
Thread runner;

public void start() {
if (runner == null) {
runner = new Thread(this);
runner.start();
}
}

public void stop() {
if (runner != null)
runner = null;
}

public void init() {
h1 = getAudioClip(getCodeBase(),"h1.wav");
h2 = getAudioClip(getCodeBase(),"h2.wav");
for (int i = 0; i < s.length; i++)
s[i] = getAudioClip(getCodeBase(),
"s" + i + ".wav");
}

public void run() {
Thread thisThread = Thread.currentThread();
while (runner == thisThread) {
sum = (int) Math.floor(Math.random() * 7 + 1);
num2 = (int) Math.floor(Math.random() * sum);
num1 = sum - num2;
repaint();
s[num1].play();
pause(600);
h1.play();
pause(600);
s[num2].play();
pause(600);
h2.play();
pause(600);
s[sum].play();
pause(5000);
}
}

public void paint(Graphics screen) {
super.paint(screen);
Graphics2D screen2D = (Graphics2D) screen;
screen2D.drawString(num1 + " + " + num2 + " = " + sum, 40, 40);
}

private void pause(int duration) {
try {
Thread.sleep(duration);
}
catch (InterruptedException e) { }
}

}
http://www.student.groept.be/acegrad...9737053/s4.wav
http://www.student.groept.be/acegrad...9737053/s5.wav
http://www.student.groept.be/acegrad...9737053/s6.wav
http://www.student.groept.be/acegrad...9737053/s7.wav
http://www.student.groept.be/acegrad...9737053/s0.wav
http://www.student.groept.be/acegrad...9737053/s1.wav
http://www.student.groept.be/acegrad...9737053/s2.wav
http://www.student.groept.be/acegrad...9737053/s3.wav
http://www.student.groept.be/acegrad...9737053/h2.wav
http://www.student.groept.be/acegrad...9737053/h1.wav
http://www.student.groept.be/acegrad...SpraakHH.class
http://www.student.groept.be/acegrad.../SpraakHH.java
http://www.student.groept.be/acegrad...praakHERVE.htm
http://www.student.groept.be/acegrad...aakHERVE.class
http://www.student.groept.be/acegrad...raakHERVE.java
addhtmfile
Reply With Quote
  #2  
Old June 15th, 2002, 01:06 PM
homer's Avatar
Safety Inspector
 
Join Date: Oct 2001
Location: Duff Gardens
Posts: 418
Thanks: 0
Thanked 0 Times in 0 Posts
homer is on a distinguished road
Say what?

So Herve, is your name Tree over on MacFora? There seems to be a remarkable similarity between Tree's posts there and yours here.
Reply With Quote
  #3  
Old June 15th, 2002, 06:56 PM
xoot's Avatar
Got xoot?
 
Join Date: Mar 2002
Location: /Users/xoot
Posts: 1,679
Thanks: 0
Thanked 0 Times in 0 Posts
xoot is on a distinguished road
HervéTech™

Change your status text to that
__________________
the xootblog - weirdness for the masses

"(Insert here)" - xoot

"God really had to go today." - googolplex
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Official Anouncement Of The Existence Of Speechtechnology tagliatelle Bob's Place 6 June 8th, 2002 03:00 PM
Can speechtechnology be an alternative? tagliatelle Bob's Place 7 June 7th, 2002 02:28 AM


All times are GMT -5. The time now is 01:31 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.