Skip to content

Commit

Permalink
Fix TTS events using libNotify
Browse files Browse the repository at this point in the history
  • Loading branch information
CoBC authored and bear101 committed Dec 24, 2024
1 parent 2c0e0a5 commit 32d430f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Client/qtTeamTalk/utiltts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@ void addTextToSpeechMessage(const QString& msg)
int timestamp = ttSettings->value(SETTINGS_TTS_TIMESTAMP, SETTINGS_TTS_TIMESTAMP_DEFAULT).toUInt();
QString noquote = msg;
noquote.replace('"', ' ');
QProcess ps;
ps.startDetached(QString("%1 -t %2 -a \"%3\" -u low \"%4: %5\"")
.arg(TTSENGINE_NOTIFY_PATH)
.arg(timestamp)
.arg(APPNAME_SHORT)
.arg(APPNAME_SHORT)
.arg(noquote));

QStringList arguments;
arguments << "-t" << QString::number(timestamp)
<< "-a" << APPNAME_SHORT
<< "-u" << "low"
<< QString("%1: %2").arg(APPNAME_SHORT, noquote);

QProcess::startDetached(TTSENGINE_NOTIFY_PATH, arguments);
#endif
break;
}
Expand Down

0 comments on commit 32d430f

Please sign in to comment.