Update Dutch language file
[maemo-rb.git] / rbutil / talkfile.h
blob9d6d28a2fe37087dca8b7477bfe51de7428d4859
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * Module: rbutil
9 * File: tts.h
11 * Copyright (C) 2007 Dominik wenger
13 * All files in this archive are subject to the GNU General Public License.
14 * See the file COPYING in the source tree root for full license agreement.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
22 #ifndef _TALKFILE_H
23 #define _TALKFILE_H
25 #include "rbutil.h"
27 class TalkFileCreator
29 friend class TalkTraverser;
30 public:
31 TalkFileCreator();
32 ~TalkFileCreator() {};
34 bool createTalkFiles();
36 void setTTSexe(wxString exe){m_TTSexec=exe;}
37 void setEncexe(wxString exe){m_EncExec=exe;}
39 wxArrayString getSupportedTTS(){return m_supportedTTS;}
40 void setTTsType(wxString tts) {m_curTTS = tts; }
41 wxString getTTsOpts(wxString ttsname);
42 void setTTsOpts(wxString opts) {m_TTSOpts=opts;}
44 wxArrayString getSupportedEnc(){return m_supportedEnc;}
45 void setEncType(wxString enc) {m_curEnc =enc; }
46 wxString getEncOpts(wxString encname);
47 void setEncOpts(wxString opts) {m_EncOpts=opts;}
49 void setDir(wxString dir){m_dir = dir; }
51 void setOverwriteTalk(bool ov) {m_overwriteTalk = ov;}
52 void setOverwriteWav(bool ov) {m_overwriteWav = ov;}
53 void setRemoveWav(bool ov) {m_removeWav = ov;}
54 void setRecursive(bool ov) {m_recursive = ov;}
55 void setStripExtensions(bool ov) {m_stripExtensions = ov;}
57 private:
59 bool initTTS();
60 bool stopTTS();
61 bool initEncoder();
63 bool encode(wxString input,wxString output);
64 bool voice(wxString text,wxString wavfile);
66 wxString m_dir;
68 wxString m_curTTS;
69 wxString m_TTSexec;
70 wxArrayString m_supportedTTS;
71 wxArrayString m_supportedTTSOpts;
72 wxString m_TTSOpts;
74 wxString m_curEnc;
75 wxString m_EncExec;
76 wxArrayString m_supportedEnc;
77 wxArrayString m_supportedEncOpts;
78 wxString m_EncOpts;
80 bool m_overwriteTalk;
81 bool m_overwriteWav;
82 bool m_removeWav;
83 bool m_recursive;
84 bool m_stripExtensions;
88 class TalkTraverser: public wxDirTraverser
90 public:
91 TalkTraverser(TalkFileCreator* talkcreator) : m_talkcreator(talkcreator) { }
93 virtual wxDirTraverseResult OnFile(const wxString& filename);
95 virtual wxDirTraverseResult OnDir(const wxString& dirname);
97 private:
98 TalkFileCreator* m_talkcreator;
101 #endif