[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kttsd
From:       Gary Cramblitt <garycramblitt () comcast ! net>
Date:       2004-03-18 22:39:07
Message-ID: 20040318223907.27BEC999A () office ! kde ! org
[Download RAW message or body]

CVS commit by cramblitt: 

Smarter sentence parsing.


  M +6 -1      kttsd/speechdata.cpp   1.5
  M +2 -1      plugins/festivalint/festivalintproc.cpp   1.5


--- kdenonbeta/kttsd/kttsd/speechdata.cpp  #1.4:1.5
@@ -29,4 +29,5 @@
 #include <kglobal.h>
 #include <kapplication.h>
+#include <qregexp.h>
 
 #include "speechdata.h"
@@ -203,7 +204,10 @@ void SpeechData::setText( const QString 
     kdDebug() << "I'm getting: " << endl << text  << endl;
     QString temp = text;
+    QStringList tempList = \
QStringList::split(QRegExp("([\\.\\?\\:\\;]\\s)|(\\n\\n)"), temp, false); +/*    
     // This should be something better, like "[a-zA-Z]\. " (a regexp of course) The \
dot (.) is used for more than ending a sentence.  temp.replace('.', '\n');
-    QStringList tempList = QStringList::split('\n', temp, true);
+    QStringList tempList = QStringList::split('\n', temp, true);*/
+    
     for ( QStringList::Iterator it = tempList.begin(); it != tempList.end(); ++it ) \
{  kdDebug() << "'" << *it << "'" << endl;

--- kdenonbeta/kttsd/plugins/festivalint/festivalintproc.cpp  #1.4:1.5
@@ -161,4 +161,5 @@ void FestivalIntProc::stopText(){
       festProc->writeStdin(QString("(audio_mode 'shutup)"), true);
       festProc->writeStdin(QString("(quit)"), true);
+      festProc->kill();
     }
     kdDebug() << "Festival stopped." << endl;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic