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  * $Revision: 24874 $
00027  * $Author: rjongbloed $
00028  * $Date: 2010-11-11 21:22:21 -0600 (Thu, 11 Nov 2010) $
00029  */
00030 
00031 #ifndef PTLIB_PTTS_H
00032 #define PTLIB_PTTS_H
00033 
00034 #ifdef P_USE_PRAGMA
00035 #pragma interface
00036 #endif
00037 
00038 
00039 #include <ptlib/pfactory.h>
00040 
00041 
00042 class PTextToSpeech : public PObject
00043 {
00044   PCLASSINFO(PTextToSpeech, PObject);
00045   public:
00046     enum TextType {
00047       Default,
00048       Literal,
00049       Digits,
00050       Number,
00051       Currency,
00052       Time,
00053       Date,
00054       DateAndTime,
00055       Phone,
00056       IPAddress,
00057       Duration,
00058       Spell
00059     };
00060 
00061     virtual PStringArray GetVoiceList() = 0;
00062     virtual PBoolean SetVoice(const PString & voice) = 0;
00063 
00064     virtual PBoolean SetRate(unsigned rate) = 0;
00065     virtual unsigned GetRate() = 0;
00066 
00067     virtual PBoolean SetVolume(unsigned volume) = 0;
00068     virtual unsigned GetVolume() = 0;
00069 
00070     virtual PBoolean OpenFile(const PFilePath & fn) = 0;
00071     virtual PBoolean OpenChannel(PChannel * chanel) = 0;
00072     virtual PBoolean IsOpen() = 0;
00073 
00074     virtual PBoolean Close() = 0;
00075     virtual PBoolean Speak(const PString & text, TextType hint = Default) = 0;
00076 };
00077 
00078 #if P_SAPI
00079   PFACTORY_LOAD(PTextToSpeech_SAPI);
00080 #endif
00081 
00082 #ifndef _WIN32_WCE
00083   PFACTORY_LOAD(PTextToSpeech_Festival);
00084 #endif
00085 
00086 
00087 #endif // PTLIB_PTTS_H
00088 
00089 
00090 // End Of File ///////////////////////////////////////////////////////////////

Generated on Fri Oct 14 01:44:10 2011 for PTLib by  doxygen 1.4.7