From 83e2e93859e07ef91974514271c9140cd0fcffa8 Mon Sep 17 00:00:00 2001 From: Rene Renken Date: Wed, 7 Feb 2024 12:04:30 +0100 Subject: [PATCH] =?UTF-8?q?windows=20test=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/discordTools/discordVoice.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/discordTools/discordVoice.js b/src/discordTools/discordVoice.js index 521483c7f..ca22c31eb 100644 --- a/src/discordTools/discordVoice.js +++ b/src/discordTools/discordVoice.js @@ -29,7 +29,8 @@ module.exports = { const url = `https://api.streamelements.com/kappa/v2/speech?voice=${voice}&text=${encodeURIComponent(text)}`; if (connection) { - const resource = createAudioResource(url); + let stream = (await (await fetch(url)).blob()).stream() + const resource = createAudioResource(stream); const player = createAudioPlayer(); connection.subscribe(player); player.play(resource);