factor/examples/cocoa/speech.factor

12 lines
317 B
Factor
Raw Normal View History

2006-01-11 00:22:01 -05:00
! Copyright (C) 2006 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
IN: cocoa-speech
2006-02-09 22:11:22 -05:00
USING: cocoa kernel objc-NSObject objc-NSSpeechSynthesizer ;
2006-01-11 00:22:01 -05:00
2006-02-09 22:11:22 -05:00
: say ( string -- )
NSSpeechSynthesizer [alloc] f [initWithVoice:]
swap <NSString> [startSpeakingString:] ;
2006-03-10 21:51:35 -05:00
"Hello from Factor" say drop