Return arraybuffer from realistic voice API

This commit is contained in:
Jackson Harper
2023-02-16 13:19:24 +08:00
parent 7177279951
commit 9d5cb84648

View File

@ -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<Buffer>(
requestUrl,
{
@ -31,6 +31,7 @@ export class RealisticTextToSpeech implements TextToSpeech {
},
{
headers: HEADERS,
responseType: 'arraybuffer',
}
)