00001 /* 00002 * ptts.h 00003 * 00004 * Text To Speech classes 00005 * 00006 * Portable Windows Library 00007 * 00008 * Copyright (c) 2002 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Portable Windows Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Contributor(s): ______________________________________. 00025 * 00026 * $Log: ptts.h,v $ 00027 * Revision 1.9 2007/09/18 06:21:49 csoutheren 00028 * Add new texttospeech types 00029 * 00030 * Revision 1.8 2007/04/19 04:33:53 csoutheren 00031 * Fixed problems with pre-compiled headers 00032 * 00033 * Revision 1.7 2005/01/04 07:44:02 csoutheren 00034 * More changes to implement the new configuration methodology, and also to 00035 * attack the global static problem 00036 * 00037 * Revision 1.6 2004/07/07 07:18:43 csoutheren 00038 * Removed warnings on Linux from Windows static global hacks 00039 * 00040 * Revision 1.5 2004/07/06 10:12:51 csoutheren 00041 * Added static integer o factory template to assist in ensuring factories are instantiated 00042 * 00043 * Revision 1.4 2004/06/19 07:18:58 csoutheren 00044 * Change TTS engine registration to use abstract factory code 00045 * 00046 * Revision 1.3 2002/11/06 22:47:24 robertj 00047 * Fixed header comment (copyright etc) 00048 * 00049 * Revision 1.2 2002/09/16 01:08:59 robertj 00050 * Added #define so can select if #pragma interface/implementation is used on 00051 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00052 * 00053 * Revision 1.1 2002/08/06 04:45:38 craigs 00054 * Initial version 00055 * 00056 */ 00057 00058 #ifndef _PTEXTTOSPEECH 00059 #define _PTEXTTOSPEECH 00060 00061 #ifdef P_USE_PRAGMA 00062 #pragma interface 00063 #endif 00064 00065 #ifndef _PTLIB_H 00066 #include <ptlib.h> 00067 #endif 00068 00069 #include <ptclib/ptts.h> 00070 00071 class PTextToSpeech : public PObject 00072 { 00073 PCLASSINFO(PTextToSpeech, PObject); 00074 public: 00075 enum TextType { 00076 Default, 00077 Literal, 00078 Digits, 00079 Number, 00080 Currency, 00081 Time, 00082 Date, 00083 DateAndTime, 00084 Phone, 00085 IPAddress, 00086 Duration, 00087 Spell 00088 }; 00089 00090 virtual PStringArray GetVoiceList() = 0; 00091 virtual BOOL SetVoice(const PString & voice) = 0; 00092 00093 virtual BOOL SetRate(unsigned rate) = 0; 00094 virtual unsigned GetRate() = 0; 00095 00096 virtual BOOL SetVolume(unsigned volume) = 0; 00097 virtual unsigned GetVolume() = 0; 00098 00099 virtual BOOL OpenFile (const PFilePath & fn) = 0; 00100 virtual BOOL OpenChannel(PChannel * chanel) = 0; 00101 virtual BOOL IsOpen() = 0; 00102 00103 virtual BOOL Close () = 0; 00104 virtual BOOL Speak (const PString & text, TextType hint = Default) = 0; 00105 }; 00106 00107 #endif