File: programming/cocoa/UKSpeechSynthesizer.zip/UKSpeechSynthesizer/UKSpeechSynthesizer.h


//
//  UKSpeechSynthesizer.h
//  UKSpeechSynthesizer
//
//  Created by Uli Kusterer on Mon Jun 30 2003.
//  Copyright (c) 2003 M. Uli Kusterer. All rights reserved.
//
 
/* -----------------------------------------------------------------------------
	Headers:
   -------------------------------------------------------------------------- */
 
#import <Foundation/Foundation.h>
 
 
/* -----------------------------------------------------------------------------
	Forwards:
   -------------------------------------------------------------------------- */
 
// This avoids our users from having to include all of Carbon.h every time:
#ifndef __SPEECHSYNTHESIS__
#endif
 
 
/* -----------------------------------------------------------------------------
	UKSpeechSynthesizer:
   -------------------------------------------------------------------------- */// The actual Carbon speech channel that is used for speech output.
// The delegate that gets notified of all those callbacks.
// Dummy for NSSpeechSynthesizer compatibility.
// Keep track whether we're speaking.
// The currently assigned voice.
 
// private:
// We can't pass parameters when calling back to the main thread, so we stash the phoneme here.
// cast to SpeechDoneUPP
// cast to SpeechPhonemeUPP
// Keeps a copy of the text being spoken.
}
 
// Class methods:
// UKSpeechSynthesizer-specific.
// UKSpeechSynthesizer-specific.
// UKSpeechSynthesizer-specific.
// UKSpeechSynthesizer-specific.
// UKSpeechSynthesizer-specific.
 
// Instance methods:
// Recreates the internal speech channel.
// This retains the channel until speech is done.
// Dummied out:
// This remembers the state, but doesn't actually bring up a feedback window.
//-(void)		startSpeakingString: (NSString*)str toURL:(NSURL*)url;
 
// UKSpeechChannel-specific:
// Delegate methods: (informal protocol)
//- (void)speechSynthesizer:(UKSpeechSynthesizer *)sender willSpeakWord:(NSRange)characterRange ofString:(NSString *)string;
// This is what we prefix when returning voice identifiers so we're compatible with NSSpeechChannel:
#define UK_SPEECH_VOICE_PREFIX  @"com.apple.speech.synthesis.voice."
 
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
 
#define NSVoiceName			@"NSVoiceName"
#define NSVoiceIdentifier   @"NSVoiceIdentifier"
#define NSVoiceAge			@"NSVoiceAge"
#define NSVoiceGender		@"NSVoiceGender"
#define NSVoiceDemoText		@"NSVoiceDemoText"
#define NSVoiceLanguage		@"NSVoiceLanguage"
 
#define NSVoiceGenderNeuter @"NSVoiceGenderNeuter"
#define NSVoiceGenderMale   @"NSVoiceGenderMale"
#define NSVoiceGenderFemale @"NSVoiceGenderFemale"
 
#endif
 

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.