Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37501740
en ru br
Репозитории ALT
S:2.0.0.11-alt2
5.1: 0.9.6-alt5.M51.1
4.1: 0.9.6-alt5.M41.1
4.0: 0.9.6-alt5.M40.1
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: basic256

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: basic256-0.9.6-alt-fix-say-function.patch
Скачать


--- trunk/RunController.cpp.orig	2010-11-05 21:58:10 +0300
+++ trunk/RunController.cpp	2010-12-15 19:36:23 +0300
@@ -310,6 +310,18 @@ RunController::speakWords(QString text)
     }
 
     ::CoUninitialize();
+#else
+
+	QString voice = "";
+	QString localecode = QLocale::system().name();
+	QString pVoice = "/usr/share/espeak-data/voices/"+localecode.left(2);
+	QFileInfo fi(pVoice);
+	if (fi.exists()) {
+		voice = "-v "+localecode.left(2) + " ";
+	}
+	QString command = QString("espeak ") + voice + QString("\"") + text + QString("\"");
+	system(command.toUtf8());
+
 #endif
 #ifdef LINUX_ESPEAK
 	//QMessageBox::information( 0, "BASIC-256", QString("ESpeak"));
--- trunk/basic256.pro.orig	2010-12-15 19:12:08 +0300
+++ trunk/basic256.pro	2010-12-15 19:34:36 +0300
@@ -39,9 +39,9 @@ unix:!macx {
 	
 	## for the SAY command (LINUX) you need to choose one TTS engine - uncomment the one desired
 	## espeak library (causes problems with sound statement in 0.9.5i under ubuntu 9.10 - suggest flite)
-	DEFINES		+= 	LINUX_ESPEAK
-	INCLUDEPATH		+=	/usr/include/espeak
-	LIBS			+=	-lespeak
+	#DEFINES		+= 	LINUX_ESPEAK
+	#INCLUDEPATH		+=	/usr/include/espeak
+	#LIBS			+=	-lespeak
 
 	## flite library
 	#DEFINES			+= 	LINUX_FLITE
@@ -51,7 +51,7 @@ unix:!macx {
 	#LIBS			+=	-lflite_cmulex
 	#LIBS			+=	-lflite_usenglish
 	
-	LIBS			+=	-lm
+	#LIBS			+=	-lm
 
 	## include libraries for SDL audio for wav and sound output
 	DEFINES 		+= USESDL
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin