From 633749ea61585940f8a003aab9c9db9afb96a030 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Tue, 17 Jan 2012 20:18:47 +0100 Subject: TTS: check if created wav file exists. Instead of simply assuming the wav file that is supposed to be created by the TTS engine check if the file actually exists and return an error if not. Change-Id: I9e4a85a061b44b48931614602683b1dfe7dfce67 --- rbutil/rbutilqt/base/ttssapi.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rbutil/rbutilqt/base/ttssapi.cpp') diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp index b5e6a69624..4ca82a798b 100644 --- a/rbutil/rbutilqt/base/ttssapi.cpp +++ b/rbutil/rbutilqt/base/ttssapi.cpp @@ -233,6 +233,10 @@ TTSStatus TTSSapi::voice(QString text,QString wavfile, QString *errStr) while( voicescript->readLine(temp,20) == 0) QCoreApplication::processEvents(); + if(!QFileInfo(wavfile).isFile()) { + qDebug() << "[TTSExes] output file does not exist:" << wavfile; + return FatalError; + } return NoError; } -- cgit v1.2.3