summaryrefslogtreecommitdiff
path: root/rbutil/talkfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/talkfile.h')
-rw-r--r--rbutil/talkfile.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/rbutil/talkfile.h b/rbutil/talkfile.h
new file mode 100644
index 0000000000..196c923029
--- /dev/null
+++ b/rbutil/talkfile.h
@@ -0,0 +1,101 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * Module: rbutil
9 * File: tts.h
10 *
11 * Copyright (C) 2007 Dominik wenger
12 *
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.
15 *
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
18 *
19 ****************************************************************************/
20
21
22#ifndef _TALKFILE_H
23#define _TALKFILE_H
24
25#include "rbutil.h"
26
27class TalkFileCreator
28{
29 friend class TalkTraverser;
30public:
31 TalkFileCreator();
32 ~TalkFileCreator() {};
33
34 bool createTalkFiles();
35
36 void setTTSexe(wxString exe){m_TTSexec=exe;}
37 void setEncexe(wxString exe){m_EncExec=exe;}
38
39 wxArrayString getSupportedTTS(){return m_supportedTTS;}
40 bool setTTsType(wxString tts) {m_curTTS = tts; }
41 wxString getTTsOpts(wxString ttsname);
42 void setTTsOpts(wxString opts) {m_TTSOpts=opts;}
43
44 wxArrayString getSupportedEnc(){return m_supportedEnc;}
45 bool setEncType(wxString enc) {m_curEnc =enc; }
46 wxString getEncOpts(wxString encname);
47 void setEncOpts(wxString opts) {m_EncOpts=opts;}
48
49 void setDir(wxString dir){m_dir = dir; }
50
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;}
56
57private:
58
59 bool initTTS();
60 bool stopTTS();
61 bool initEncoder();
62
63 bool encode(wxString input,wxString output);
64 bool voice(wxString text,wxString wavfile);
65
66 wxString m_dir;
67
68 wxString m_curTTS;
69 wxString m_TTSexec;
70 wxArrayString m_supportedTTS;
71 wxArrayString m_supportedTTSOpts;
72 wxString m_TTSOpts;
73
74 wxString m_curEnc;
75 wxString m_EncExec;
76 wxArrayString m_supportedEnc;
77 wxArrayString m_supportedEncOpts;
78 wxString m_EncOpts;
79
80 bool m_overwriteTalk;
81 bool m_overwriteWav;
82 bool m_removeWav;
83 bool m_recursive;
84 bool m_stripExtensions;
85};
86
87
88class TalkTraverser: public wxDirTraverser
89{
90 public:
91 TalkTraverser(TalkFileCreator* talkcreator) : m_talkcreator(talkcreator) { }
92
93 virtual wxDirTraverseResult OnFile(const wxString& filename);
94
95 virtual wxDirTraverseResult OnDir(const wxString& dirname);
96
97 private:
98 TalkFileCreator* m_talkcreator;
99};
100
101#endif