From 2a45f32ee88d7ac8daaf5d7bb417a2075c9c7405 Mon Sep 17 00:00:00 2001 From: besdar <43372966+besdar@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:36:22 +0400 Subject: [PATCH 1/2] added a voice link for the source text --- src/reverso.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/reverso.js b/src/reverso.js index 28d168f..e92d20e 100644 --- a/src/reverso.js +++ b/src/reverso.js @@ -407,6 +407,9 @@ module.exports = class Reverso { voices[target] && response.data.translation[0].length <= 150 ? `${this.VOICE_URL}voiceName=${voices[target]}?inputText=${translationEncoded}` : null, + sourceVoice: voices[source] && text.length <= 150 + ? `${this.VOICE_URL}voiceName=${voices[target]}?inputText=${toBase64(text)}` + : null, } if (response.data.contextResults?.results) { From 6c8824d77ae8942a34d6b8155252ef925c2dc0a1 Mon Sep 17 00:00:00 2001 From: besdar <43372966+besdar@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:41:05 +0400 Subject: [PATCH 2/2] added a voice link for the source text --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b6ab95e..0d0c615 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,8 @@ Response: rude: Boolean }, // or null detected_language: String, - voice: String // or null + voice: String, // or null + sourceVoice: String // or null } ```