00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
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