Convert text to speech using OpenAI TTS
API key required. Sign up for an Ouro account and create an API key to get started.
POST https://api.ouro.foundation/routes/mmoderwell/speech/generate
The text to convert to speech
tts-1
tts-1-hd
The TTS model to use
alloy
ash
coral
echo
fable
onyx
nova
sage
shimmer
The voice to use for the speech
const url = 'https://api.ouro.foundation/routes/mmoderwell/speech/generate';
const options = {
method: 'POST',
headers: {
'Authorization': 'ApiKey {your-ouro-api-key}',
'Content-Type': 'application/json'
}
};
const payload = {
"text": "example_string",
"model": "tts-1",
"voice": "alloy"
};
options.body = JSON.stringify(payload);
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Discover other routes like this one