]> gitweb.factorcode.org Git - factor.git/blob - demos/cocoa/speech.factor
more sql changes
[factor.git] / demos / cocoa / speech.factor
1 ! Copyright (C) 2006 Slava Pestov
2 ! See http://factorcode.org/license.txt for BSD license.
3 IN: objc-classes
4 DEFER: NSSpeechSynthesizer
5
6 IN: cocoa-speech
7 USING: cocoa objc objc-classes kernel ;
8
9 "NSSpeechSynthesizer" f import-objc-class
10
11 : say ( string -- )
12         NSSpeechSynthesizer -> alloc f -> initWithVoice: swap
13     <NSString> -> startSpeakingString: drop ;
14
15 "Hello from Factor" say