author | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
---|---|---|
committer | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
commit | 39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91 (patch) (unidiff) | |
tree | 96e66fdc18dca4d4ab8611133e072f57dea224b9 /noncore/apps/opie-reader/flitedyn.cpp | |
parent | 279fc4fd1986074acbadd3a8e86fcf3968a8dd5c (diff) | |
download | opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.zip opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.gz opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.bz2 |
new opie-reader sources with support for ArriereGo, Reb input and flite output plugins
Diffstat (limited to 'noncore/apps/opie-reader/flitedyn.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/flitedyn.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/flitedyn.cpp b/noncore/apps/opie-reader/flitedyn.cpp new file mode 100644 index 0000000..c268cd4 --- a/dev/null +++ b/noncore/apps/opie-reader/flitedyn.cpp | |||
@@ -0,0 +1,29 @@ | |||
1 | #include "flitedyn.h" | ||
2 | |||
3 | cst_voice *CFliteDyn::m_voice = NULL; | ||
4 | |||
5 | CFliteDyn::CFliteDyn() | ||
6 | { | ||
7 | if (m_voice == NULL) | ||
8 | { | ||
9 | qDebug("Constucting flite"); | ||
10 | flite_init(); | ||
11 | m_voice = register_cmu_us_kal(); | ||
12 | } | ||
13 | } | ||
14 | |||
15 | QString CFliteDyn::about() | ||
16 | { | ||
17 | return QString("FliteDyn output codec (c) Tim Wentford\n"); | ||
18 | } | ||
19 | |||
20 | void CFliteDyn::output(const QString& _o) | ||
21 | { | ||
22 | float tm = flite_text_to_speech((const char*)_o, m_voice, "play"); | ||
23 | qDebug("Produced %g seconds of speech", tm); | ||
24 | } | ||
25 | |||
26 | extern "C" | ||
27 | { | ||
28 | COutput* newcodec() { return new CFliteDyn; } | ||
29 | } | ||