///////////////////////////////////////////////////////////////////////////// // Name: speech.h // tag: heaader for speech functions // Author: David Roundy // Modified by: // Created: 4/2002 // Copyright: (c) 2002 David Roundy // Licence: GPL /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ ///////////////////////////////////////////////////////////////////////////// #ifndef _SPEECH_H_ #define _SPEECH_H_ // For compilers that support precompilation, includes "wx/wx.h". #ifndef WX_PRECOMP #include #endif #include "config.h" #ifdef WITH_SPEECH #ifdef USE_FESTIVAL // There is a bug in EST that requires the following... #undef HAVE_CONFIG_H #include inline void speak_string(const wxString &str) { festival_say_text(str.c_str()); } inline void init_speech() { int heap_size = 210000; // default scheme heap size int load_init_files = 1; // we want the festival init files loaded festival_initialize(load_init_files,heap_size); // try to play a nonexistant file, just to put us in async mode. festival_say_file("~THIS_FILE_DOES_NOT_EXIST~"); } #endif // USE_FESTIVAL #ifdef USE_FLITE #include void speak_string(const wxString &str); inline void init_speech() { flite_init(); } #endif // USE_FLITE #ifdef __WXMAC__ void speak_string(const wxString &str); void init_speech(); #endif #else // WITH_SPEECH inline void speak_string(const wxString &str) { } inline void init_speech() { } #endif #endif