Monday, November 29, 2010

Saying "hello world!" on MacOSX ..

Here is a different "hello world!" by muSE on MacOSX :)


; Load the AppKit framework containing the NSSpeechSynthesizer class
[[NSBundle bundleWithPath: "/System/Library/Frameworks/AppKit.framework"]
load]

; Initialize the "hysterical" voice and say "Hello world!" with it.
(define hysterical
[[[NSSpeechSynthesizer alloc] initWithVoice: "com.apple.speech.synthesis.voice.Hysterical"]
autorelease])

[hysterical startSpeakingString: "Hello world!"]

No comments:

Post a Comment