Text-to-Speech

무료
분류별 voicerss | 업데이트됨 il y a un mois | Media
인기

9.8 / 10

지연 시간

637ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

to play the audio, here is my code

to play audio, just add b64 = ‘true’. and just pass the response.data to audio src.!
here is my code.

export async function speak({ trans, lang, voice,speed }, caller = () => { }) {
var options = {
method: ‘GET’,
url: https://voicerss-text-to-speech.p.rapidapi.com/,
params: {
key: ‘2621446e80894ff89a7b79769cba0202’,
src: trans || ‘text is not defind’,
hl: lang,
v: voice,
r: speed,
c: ‘mp3’,
f: ‘8khz_8bit_stereo’,
b64: true,
// f: ‘16khz_16bit_stereo’,
},
headers: {
‘X-RapidAPI-Host’: ‘voicerss-text-to-speech.p.rapidapi.com’,
‘X-RapidAPI-Key’: ‘aff1177afamsh1fb255402c24c5ap1be9e4jsn4efe400f2d7e’
}
};

const res = await axios.request(options)
return res.data

}

const audio = speak(…)
<audio src={audio}/>

Rapid account: Intizarahmad 853
intizarahmad853 Commented il y a 2 ans

you are such an amazing guy! you should be proud of that

Rapid account: Christophersoncrant
christophersoncrant Commented il y a 2 ans

Thanks for this!

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입