Discussions

Ask a Question
Back to All

TTS Batch Request

Hello,

Question for you all. Does the API support batch requests? I've tried the following as the content of my request and I get an error. I noticed that a successful response from the API contains an array of URLs (Even though there is only one element).

Request Content

[{"speed":1,"text":"This is string 1","speaker":"640f477d2babeb0024be422b"},{"speed":1,"text":"And this is string 2","speaker":"640f477d2babeb0024be422b"}]

API Response

{"statusCode":400,"timestamp":"2023-11-17T00:14:51.572Z","path":"/api/v1/tts/sync","error":"text must be longer than or equal to 1 characters, Input text must not be greater than 500 characters per block. Please separate it out into different blocks., text must be a string, text should not be empty, speaker must be a mongodb id, speaker: undefined is not Found; please use other speaker instead, speed must not be greater than 3, speed must not be less than 0.05, speed must be a number conforming to the specified constraints","errorCode":"InvalidInputException"}

Thanks!