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 #include <ptlib.h>
00039
00040
00041 #include <ptclib/ptts.h>
00042
00043 class PTextToSpeech : public PObject
00044 {
00045 PCLASSINFO(PTextToSpeech, PObject);
00046 public:
00047 enum TextType {
00048 Default,
00049 Literal,
00050 Digits,
00051 Number,
00052 Currency,
00053 Time,
00054 Date,
00055 DateAndTime,
00056 Phone,
00057 IPAddress,
00058 Duration,
00059 Spell
00060 };
00061
00062 virtual PStringArray GetVoiceList() = 0;
00063 virtual PBoolean SetVoice(const PString & voice) = 0;
00064
00065 virtual PBoolean SetRate(unsigned rate) = 0;
00066 virtual unsigned GetRate() = 0;
00067
00068 virtual PBoolean SetVolume(unsigned volume) = 0;
00069 virtual unsigned GetVolume() = 0;
00070
00071 virtual PBoolean OpenFile (const PFilePath & fn) = 0;
00072 virtual PBoolean OpenChannel(PChannel * chanel) = 0;
00073 virtual PBoolean IsOpen() = 0;
00074
00075 virtual PBoolean Close () = 0;
00076 virtual PBoolean Speak (const PString & text, TextType hint = Default) = 0;
00077 };
00078
00079
00080 #endif // PTLIB_PTTS_H
00081
00082
00083