mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-19 10:02:45 -05:00
rbutil: fix a problem with voicing and encoding of non-latin chars.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16420 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
460d6d2d22
commit
d809d186f7
2 changed files with 4 additions and 4 deletions
|
|
@ -186,11 +186,11 @@ bool EncRbSpeex::encode(QString input,QString output)
|
||||||
char errstr[512];
|
char errstr[512];
|
||||||
|
|
||||||
FILE *fin,*fout;
|
FILE *fin,*fout;
|
||||||
if ((fin = fopen(input.toUtf8(), "rb")) == NULL) {
|
if ((fin = fopen(input.toLocal8Bit(), "rb")) == NULL) {
|
||||||
qDebug() << "Error: could not open input file\n";
|
qDebug() << "Error: could not open input file\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((fout = fopen(output.toUtf8(), "wb")) == NULL) {
|
if ((fout = fopen(output.toLocal8Bit(), "wb")) == NULL) {
|
||||||
qDebug() << "Error: could not open output file\n";
|
qDebug() << "Error: could not open output file\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ bool TTSSapi::voice(QString text,QString wavfile)
|
||||||
{
|
{
|
||||||
QString query = "SPEAK\t"+wavfile+"\t"+text+"\r\n";
|
QString query = "SPEAK\t"+wavfile+"\t"+text+"\r\n";
|
||||||
qDebug() << "voicing" << query;
|
qDebug() << "voicing" << query;
|
||||||
voicescript->write(query.toUtf8());
|
voicescript->write(query.toLocal8Bit());
|
||||||
voicescript->write("SYNC\tbla\r\n");
|
voicescript->write("SYNC\tbla\r\n");
|
||||||
voicescript->waitForReadyRead();
|
voicescript->waitForReadyRead();
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -275,7 +275,7 @@ bool TTSSapi::voice(QString text,QString wavfile)
|
||||||
bool TTSSapi::stop()
|
bool TTSSapi::stop()
|
||||||
{
|
{
|
||||||
QString query = "QUIT\r\n";
|
QString query = "QUIT\r\n";
|
||||||
voicescript->write(query.toUtf8());
|
voicescript->write(query.toLocal8Bit());
|
||||||
voicescript->waitForFinished();
|
voicescript->waitForFinished();
|
||||||
delete voicescript;
|
delete voicescript;
|
||||||
QFile::setPermissions(QDir::tempPath() +"/sapi_voice.vbs",QFile::ReadOwner |QFile::WriteOwner|QFile::ExeOwner
|
QFile::setPermissions(QDir::tempPath() +"/sapi_voice.vbs",QFile::ReadOwner |QFile::WriteOwner|QFile::ExeOwner
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue