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: 20385 $
00027  * $Author: rjongbloed $
00028  * $Date: 2008-06-04 10:40:38 +0000 (Wed, 04 Jun 2008) $
00029  */
00030 
00031 #ifndef _PTEXTTOSPEECH
00032 #define _PTEXTTOSPEECH
00033 
00034 #ifdef P_USE_PRAGMA
00035 #pragma interface
00036 #endif
00037 
00038 #ifndef _PTLIB_H
00039 #include <ptlib.h>
00040 #endif
00041 
00042 #include <ptclib/ptts.h>
00043 
00044 class PTextToSpeech : public PObject
00045 {
00046   PCLASSINFO(PTextToSpeech, PObject);
00047   public:
00048     enum TextType {
00049       Default,
00050       Literal,
00051       Digits,
00052       Number,
00053       Currency,
00054       Time,
00055       Date,
00056       DateAndTime,
00057       Phone,
00058       IPAddress,
00059       Duration,
00060       Spell
00061     };
00062 
00063     virtual PStringArray GetVoiceList() = 0;
00064     virtual PBoolean SetVoice(const PString & voice) = 0;
00065 
00066     virtual PBoolean SetRate(unsigned rate) = 0;
00067     virtual unsigned GetRate() = 0;
00068 
00069     virtual PBoolean SetVolume(unsigned volume) = 0;
00070     virtual unsigned GetVolume() = 0;
00071 
00072     virtual PBoolean OpenFile   (const PFilePath & fn) = 0;
00073     virtual PBoolean OpenChannel(PChannel * chanel) = 0;
00074     virtual PBoolean IsOpen() = 0;
00075 
00076     virtual PBoolean Close      () = 0;
00077     virtual PBoolean Speak      (const PString & text, TextType hint = Default) = 0;
00078 };
00079 
00080 #endif

Generated on Mon Feb 23 01:57:54 2009 for PTLib by  doxygen 1.5.1