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

Commit

Permalink
fixed: Sometimes TTS engine pronounces space as "percent twenty"
Browse files Browse the repository at this point in the history
  • Loading branch information
veksha committed Apr 16, 2023
1 parent c964a31 commit 66ec756
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
uses: lukka/[email protected]
if: runner.os == 'Windows'
with:
vcpkgGitCommitId: fd766eba2b4cf59c7123d46189be373e2cee959d
vcpkgGitCommitId: d4acc3c3f2db0b9fa7fc47b4751ec5778331f996

- name: Setup MSVC
if: runner.os == 'Windows'
Expand Down
8 changes: 0 additions & 8 deletions src/qonlinetts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ void QOnlineTts::generateUrls(const QString &text, QOnlineTranslator::Engine eng
// Generate URL API for add it to the playlist
QUrl apiUrl(QStringLiteral("https://translate.googleapis.com/translate_tts"));
const QString query = QStringLiteral("ie=UTF-8&client=gtx&tl=%1&q=%2").arg(langString, QString(QUrl::toPercentEncoding(unparsedText.left(splitIndex))));
#if defined(Q_OS_LINUX)
apiUrl.setQuery(query);
#elif defined(Q_OS_WIN)
apiUrl.setQuery(query, QUrl::DecodedMode);
#endif
m_media.append(apiUrl);

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

// Remove the said part from the next saying
Expand Down

0 comments on commit 66ec756

Please sign in to comment.