Voicefile generation: implement string corrections.

Voicefile generation now can correct strings for the TTS system similar
to what voice.pl does. The current implementation has some limitations:
- only implemented for voicefile creation.
- the corrections file is built in and can't get changed.
- string corrections can be disabled in the configuration dialog.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30628 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2011-10-01 19:48:58 +00:00
parent 7f2defc453
commit 4f56b50df4
10 changed files with 119 additions and 8 deletions

View file

@ -67,11 +67,13 @@ public:
TalkGenerator(QObject* parent);
Status process(QList<TalkEntry>* list,int wavtrimth = -1);
QString correctString(QString s);
public slots:
void abort();
void encProgress(int value);
void ttsProgress(int value);
void setLang(QString name);
signals:
void done(bool);
@ -95,6 +97,15 @@ private:
bool m_ttsWarnings;
bool m_userAborted;
QString m_lang;
struct CorrectionItems
{
QString search;
QString replace;
QString modifier;
};
QList<struct CorrectionItems> m_corrections;
};