Warning:
Can't use blame annotator:svn blame failed on /Trunk/Adium.framework/Versions/A/Headers/SUSpeaker.h: ("Can't find a temporary directory: Internal error", 20014)
Revision 2, 1.4 KB
(checked in by jon, 16 years ago)
|
Initial commit of skeletal project.
|
Rev | Line | |
---|
| 1 | // |
---|
| 2 | // SUSpeaker.h |
---|
| 3 | // |
---|
| 4 | // Created by raf on Sun Jan 28 2001. |
---|
| 5 | // Based on SpeechUtilities framework by Raphael Sebbe. |
---|
| 6 | // Revised by Evan Schoenberg on Tue Sep 30 2003. |
---|
| 7 | // Optimized and expanded by Evan Schoenberg. |
---|
| 8 | |
---|
| 9 | #import <Foundation/Foundation.h> |
---|
| 10 | #import <Carbon/Carbon.h> |
---|
| 11 | |
---|
| 12 | /*! |
---|
| 13 | * @class SUSpeaker |
---|
| 14 | * @brief Cocoa wrapper for the Carbon Speech Synthesis Manager |
---|
| 15 | */ |
---|
| 16 | @interface SUSpeaker : NSObject |
---|
| 17 | { |
---|
| 18 | SpeechChannel _speechChannel; |
---|
| 19 | id _delegate; |
---|
| 20 | NSPort *_port; |
---|
| 21 | |
---|
| 22 | BOOL _usePort; |
---|
| 23 | unsigned int _reserved1; |
---|
| 24 | unsigned int _reserved2; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | + (NSArray *)voiceNames; |
---|
| 28 | //+(NSString*) defaultVoiceName; |
---|
| 29 | |
---|
| 30 | //pitch is in Hertz. |
---|
| 31 | - (void) setPitch:(float)pitch; |
---|
| 32 | - (float) pitch; |
---|
| 33 | //rate is in words per minute. |
---|
| 34 | - (void) setRate:(float)rate; |
---|
| 35 | - (float) rate; |
---|
| 36 | |
---|
| 37 | -(void)setVolume:(float)vol; |
---|
| 38 | |
---|
| 39 | //voice is an index into +voiceNames. pass -1 for the default voice. |
---|
| 40 | - (void) setVoiceUsingIndex:(int)index; |
---|
| 41 | |
---|
| 42 | - (void) speakText:(NSString*)text; |
---|
| 43 | - (void) stopSpeaking; |
---|
| 44 | - (BOOL) isSpeaking; |
---|
| 45 | |
---|
| 46 | - (void) resetToDefaults; |
---|
| 47 | |
---|
| 48 | //e.g., for Bad News: 'The light you see at the end of the tunnel is the headlamp of a fast approaching train.' (remember that Bad News is a singing voice...) |
---|
| 49 | - (NSString *)demoTextForVoiceAtIndex:(int)voiceIndex; |
---|
| 50 | |
---|
| 51 | -(void) setDelegate:(id)delegate; |
---|
| 52 | -(id) delegate; |
---|
| 53 | |
---|
| 54 | @end |
---|
| 55 | |
---|
| 56 | @interface NSObject (SUSpeakerDelegate) |
---|
| 57 | -(void) didFinishSpeaking:(SUSpeaker*)speaker; |
---|
| 58 | -(void) willSpeakWord:(SUSpeaker*)speaker at:(int)where length:(int)length; |
---|
| 59 | @end |
---|
Download in other formats: