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.7 2005/01/04 07:44:02 csoutheren 00028 * More changes to implement the new configuration methodology, and also to 00029 * attack the global static problem 00030 * 00031 * Revision 1.6 2004/07/07 07:18:43 csoutheren 00032 * Removed warnings on Linux from Windows static global hacks 00033 * 00034 * Revision 1.5 2004/07/06 10:12:51 csoutheren 00035 * Added static integer o factory template to assist in ensuring factories are instantiated 00036 * 00037 * Revision 1.4 2004/06/19 07:18:58 csoutheren 00038 * Change TTS engine registration to use abstract factory code 00039 * 00040 * Revision 1.3 2002/11/06 22:47:24 robertj 00041 * Fixed header comment (copyright etc) 00042 * 00043 * Revision 1.2 2002/09/16 01:08:59 robertj 00044 * Added #define so can select if #pragma interface/implementation is used on 00045 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00046 * 00047 * Revision 1.1 2002/08/06 04:45:38 craigs 00048 * Initial version 00049 * 00050 */ 00051 00052 #ifndef _PTEXTTOSPEECH 00053 #define _PTEXTTOSPEECH 00054 00055 #ifdef P_USE_PRAGMA 00056 #pragma interface 00057 #endif 00058 00059 #include <ptlib.h> 00060 #include <ptclib/ptts.h> 00061 00062 class PTextToSpeech : public PObject 00063 { 00064 PCLASSINFO(PTextToSpeech, PObject); 00065 public: 00066 enum TextType { 00067 Default, 00068 Literal, 00069 Digits, 00070 Number, 00071 Currency, 00072 Time, 00073 Date, 00074 Phone, 00075 IPAddress, 00076 Duration 00077 }; 00078 00079 virtual PStringArray GetVoiceList() = 0; 00080 virtual BOOL SetVoice(const PString & voice) = 0; 00081 00082 virtual BOOL SetRate(unsigned rate) = 0; 00083 virtual unsigned GetRate() = 0; 00084 00085 virtual BOOL SetVolume(unsigned volume) = 0; 00086 virtual unsigned GetVolume() = 0; 00087 00088 virtual BOOL OpenFile (const PFilePath & fn) = 0; 00089 virtual BOOL OpenChannel(PChannel * chanel) = 0; 00090 virtual BOOL IsOpen() = 0; 00091 00092 virtual BOOL Close () = 0; 00093 virtual BOOL Speak (const PString & text, TextType hint = Default) = 0; 00094 }; 00095 00096 #endif