Text-to-Speech

БЕЗКОШТОВНО
(Ким) voicerss | Оновлено 14 days ago | Media
Популярність

9.8 / 10

Затримки

900ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

Regarding about post request

Rapid account: Sharavanak 20
sharavanak20
2 years ago

If my request is POST ,the response audio is somewhat like this ID3 and it goes like on this.

And ,it couldn’t able to play in audio tag.Also I requested as mp3 format.Any suggestion,it will be helpful.

Rapid account: Sharavanak 20
sharavanak20 Commented 2 years ago

Thank you for your response.Here is the request url.

const encodedParams = new URLSearchParams();
encodedParams.append(“src”, “Hello”);
encodedParams.append(“en”, “en-us”);
encodedParams.append(“r”, “0”);
encodedParams.append(“c”, “b64”);
encodedParams.append(“f”, “8khz_8bit_mono”);
const options = {
method: ‘POST’,
url: ‘https://voicerss-text-to-speech.p.rapidapi.com/’,
params: {key: Mykey},
headers: {
‘content-type’: ‘application/x-www-form-urlencoded’,
‘X-RapidAPI-Key’: x-rapid-Key,
‘X-RapidAPI-Host’: ‘voicerss-text-to-speech.p.rapidapi.com
},
data: encodedParams
};

           axios.request(options).then(function (response) {
            audio.src = response.data;
           console.log(response.data);
        }).catch(function (error) {
           console.error(error);
        });
Rapid account: Voicerss
voicerss Commented 2 years ago

Dear sharavanak20,

Please share with an example of your request and we will be glad to assist you with it.

The audio tag can play from URL or base64 audio content.
Please be sure that the requests parameter ‘b64’ set to ‘true’.
In this case the API returns an audio content in the base64 string format which playable by the audio tag.

Please find below the link to the API documentation which may be helpful:
https://www.voicerss.org/api/

Yours faithfully,
Voice RSS Team.

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення