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 } ``` 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) {