diff --git a/examples/cocoa/speech.factor b/examples/cocoa/speech.factor new file mode 100644 index 0000000000..6ec3d706da --- /dev/null +++ b/examples/cocoa/speech.factor @@ -0,0 +1,12 @@ +! Copyright (C) 2006 Slava Pestov +! See http://factorcode.org/license.txt for BSD license. + +IN: cocoa-speech +USING: cocoa objc objc-classes kernel ; + +"NSSpeechSynthesizer" f import-objc-class + +: say ( string -- ) + NSSpeechSynthesizer -> alloc f -> initWithVoice: swap -> startSpeakingString: ; + +"Hello from Factor" say \ No newline at end of file