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 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