Commit bd2da1d2 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #417 from thomasgubler/linux_text2speech

re-enable linux text to speech and fix use of deprecated function
parents e36112fb 0d445a4d
......@@ -131,9 +131,9 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent),
#endif
// Initialize audio output
//m_media = new Phonon::MediaObject(this);
//Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
//createPath(m_media, audioOutput);
m_media = new Phonon::MediaObject(this);
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
createPath(m_media, audioOutput);
// Prepare regular emergency signal, will be fired off on calling startEmergency()
emergencyTimer = new QTimer();
......@@ -223,8 +223,8 @@ bool GAudioOutput::say(QString text, int severity)
cst_wave *wav = flite_text_to_wave(text.toStdString().c_str(), v);
// file.fileName() returns the unique file name
cst_wave_save(wav, file.fileName().toStdString().c_str(), "riff");
//m_media->setCurrentSource(Phonon::MediaSource(file.fileName().toStdString().c_str()));
//m_media->play();
m_media->setCurrentSource(Phonon::MediaSource(QUrl::fromLocalFile(file.fileName().toStdString().c_str())));
m_media->play();
res = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment