Skip to content
This repository was archived by the owner on Jul 4, 2024. It is now read-only.

Commit 9a26d3c

Browse files
authored
Fix sometimes TTS engine pronounces space as "percent twenty" (#51)
1 parent 85f4b8c commit 9a26d3c

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
uses: lukka/run-vcpkg@v10.7
7373
if: runner.os == 'Windows'
7474
with:
75-
vcpkgGitCommitId: fd766eba2b4cf59c7123d46189be373e2cee959d
75+
vcpkgGitCommitId: d4acc3c3f2db0b9fa7fc47b4751ec5778331f996
7676

7777
- name: Setup MSVC
7878
if: runner.os == 'Windows'

src/qonlinetts.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,7 @@ void QOnlineTts::generateUrls(const QString &text, QOnlineTranslator::Engine eng
9393
// Generate URL API for add it to the playlist
9494
QUrl apiUrl(QStringLiteral("https://translate.googleapis.com/translate_tts"));
9595
const QString query = QStringLiteral("ie=UTF-8&client=gtx&tl=%1&q=%2").arg(langString, QString(QUrl::toPercentEncoding(unparsedText.left(splitIndex))));
96-
#if defined(Q_OS_LINUX)
9796
apiUrl.setQuery(query);
98-
#elif defined(Q_OS_WIN)
99-
apiUrl.setQuery(query, QUrl::DecodedMode);
100-
#endif
10197
m_media.append(apiUrl);
10298

10399
// Remove the said part from the next saying
@@ -126,11 +122,7 @@ void QOnlineTts::generateUrls(const QString &text, QOnlineTranslator::Engine eng
126122
QUrl apiUrl(QStringLiteral("https://tts.voicetech.yandex.net/tts"));
127123
const QString query = QStringLiteral("text=%1&lang=%2&speaker=%3&emotion=%4&format=mp3")
128124
.arg(QUrl::toPercentEncoding(unparsedText.left(splitIndex)), langString, voiceString, emotionString);
129-
#if defined(Q_OS_LINUX)
130125
apiUrl.setQuery(query);
131-
#elif defined(Q_OS_WIN)
132-
apiUrl.setQuery(query, QUrl::DecodedMode);
133-
#endif
134126
m_media.append(apiUrl);
135127

136128
// Remove the said part from the next saying

0 commit comments

Comments
 (0)