From 9d5cb8464845e05d57b647f52dd1690e96db588e Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 16 Feb 2023 13:19:24 +0800 Subject: [PATCH] Return arraybuffer from realistic voice API --- packages/text-to-speech/src/realisticTextToSpeech.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/text-to-speech/src/realisticTextToSpeech.ts b/packages/text-to-speech/src/realisticTextToSpeech.ts index 9b76942f2..fa3e99159 100644 --- a/packages/text-to-speech/src/realisticTextToSpeech.ts +++ b/packages/text-to-speech/src/realisticTextToSpeech.ts @@ -23,7 +23,7 @@ export class RealisticTextToSpeech implements TextToSpeech { 'Content-Type': 'application/json', } - const requestUrl = `${apiEndpoint}/${voiceId}` + const requestUrl = `${apiEndpoint}${voiceId}` const response = await axios.post( requestUrl, { @@ -31,6 +31,7 @@ export class RealisticTextToSpeech implements TextToSpeech { }, { headers: HEADERS, + responseType: 'arraybuffer', } )