include/tts/tts_espeak.h

Go to the documentation of this file.
00001 
00002 // Name:        tts_espeak.h
00003 // Purpose:     A wxWidgets wrapper around eSpeak
00004 // Author:      Julian Smart
00005 // Modified by: 
00006 // Created:     2009-02-10
00007 // RCS-ID:      
00008 // Copyright:   (c) Julian Smart
00009 // Licence:     New BSD License
00011 
00012 #ifndef _WX_TTS_ESPEAK_H_
00013 #define _WX_TTS_ESPEAK_H_
00014 
00015 /*
00016  * Includes
00017  */
00018 
00019 #include "tts/tts_process.h"
00020 
00021 /*
00022  * Styles and types
00023  */
00024 
00025 // eSpeak-specific properties
00026 
00027 #define wxTTS_PROP_ESPEAK_8BIT_ENCODING         wxT("8 bit encoding")
00028 #define wxTTS_PROP_ESPEAK_QUIET_OPERATION       wxT("Quiet operation")
00029 #define wxTTS_PROP_ESPEAK_NO_FINAL_PAUSE        wxT("No final pause")
00030 
00037 class wxTTSEspeakHandler: public wxTTSExternalCommandHandler
00038 {    
00039     DECLARE_DYNAMIC_CLASS( wxTTSEspeakHandler )
00040 
00041 public:
00042 // Constructors
00043 
00044     wxTTSEspeakHandler();
00045     ~wxTTSEspeakHandler();
00046 
00047 // Operations
00048 
00050     void Init();
00051 
00053     virtual bool Initialize() { return true; }
00054 
00056     virtual bool Uninitialize() { return true; }
00057 
00059     virtual bool Speak(const wxString& text, int options = wxTTS_SPEAK_ASYNC);
00060 
00062     virtual bool SpeakFile(const wxString& filename, int options = wxTTS_SPEAK_ASYNC, const wxString& waveFilename = wxEmptyString);
00063 
00065     virtual bool DoSpeak(const wxString& textOrFilename, bool isFilename, int options = wxTTS_SPEAK_ASYNC, const wxString& waveFilename = wxEmptyString);
00066 
00068     virtual bool IsSpeaking() const { return (GetProcess() != NULL); }
00069 
00071     virtual wxArrayString GetAvailableVoices() const;
00072 
00074     virtual wxArrayString GetAvailableVoiceVariants() const;
00075 
00077     virtual bool HasCapability(wxTTSCapability capability) const;
00078 
00079     virtual int GetMinSpeed() const { return 80; }
00080     virtual int GetMaxSpeed() const { return 390; }
00081     virtual int GetMinVolume() const { return 0; }
00082     virtual int GetMaxVolume() const { return 200; }
00083     virtual int GetMinPitch() const { return 0; }
00084     virtual int GetMaxPitch() const { return 99; }
00085 
00087     virtual wxString GetDefaultVoice() const;
00088 
00090     virtual wxString GetDefaultVoiceVariant() const;
00091 
00093     virtual void SetProgramLocation(const wxString& location);
00094 
00096     static wxArrayString GetAvailableVoicesForDir(const wxString& voicesDir);
00097 
00098 protected:
00099 };
00100 
00101 #endif
00102     // _WX_TTS_ESPEAK_H_

Generated on Wed May 6 19:20:19 2009 for AxTk by  doxygen 1.5.1