उपयोगकर्ताओं को एक आसान टेक्स्ट टू स्पीच एपीआई के साथ जोड़ें।
हमारे उपयोग में आसान जनरेटिव एआई टेक्स्ट टू स्पीच एपीआई के साथ अपने डिवाइसेज़ और एप्लिकेशनों में रियल-टाइम वॉयस सिंथेसिस को एकीकृत करें। हमारे अति-यथार्थवादी वॉयस एआई मॉडलों के साथ रियल-टाइम में शानदार उपयोगकर्ता अनुभव बनाएं।
const options = {
method: 'POST',
headers: {
AUTHORIZATION: '<api-key>',
'X-USER-ID': '<api-key>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'PlayDialog',
text: `Country Mouse: Welcome to my humble home, cousin!
Town Mouse: Thank you, cousin. It's quite... peaceful here.
Country Mouse: It is indeed. I hope you're hungry.
I've prepared a simple meal of beans, barley, and fresh roots.
Town Mouse: Well, it's... earthy. Do you eat this every day?`,
voice: 's3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json',
voice2: 's3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json',
outputFormat: 'mp3',
speed: 1,
sampleRate: 44100,
seed: null,
temperature: null,
turnPrefix: 'Country Mouse:',
turnPrefix2: 'Town Mouse:',
prompt: '<string>',
prompt2: '<string>',
voiceConditioningSeconds: 20,
voiceConditioningSeconds2: 20,
language: 'english',
webHookUrl: '<string>',
}),
};
fetch('https://api.play.ai/api/v1/tts', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));





