forked from kohsuke/com4j
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.java
More file actions
24 lines (22 loc) · 940 Bytes
/
Copy pathMain.java
File metadata and controls
24 lines (22 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package speech;
import speech.types.ClassFactory;
import speech.types.ISpeechVoice;
import speech.types.SpeechVoiceSpeakFlags;
/**
* An example that uses the Microsoft Speech API.
*
* @author Kohsuke Kawaguchi
*/
public class Main {
public static void main(String[] args) throws Exception {
ISpeechVoice v = ClassFactory.createSpVoice();
System.out.println("Make sure your speaker is not off...");
v.speak("We the People of the United States, in Order to " +
"form a more perfect Union, establish Justice, " +
"insure domestic Tranquility, provide for the " +
"common defence, promote the general Welfare, " +
"and secure the Blessings of Liberty to ourselves " +
"and our Posterity, do ordain and establish this " +
"Constitution for the United States of America.",SpeechVoiceSpeakFlags.SVSFDefault);
}
}