Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

ptts.h

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

Generated on Tue Mar 15 10:44:52 2005 for PWLib by  doxygen 1.4.0