Discussions

Ask a Question
Back to All

Socket connection timeout sync API call using nodejs axios

const options = {
  method: 'POST',
  url: 'https://api.genny.lovo.ai/api/v1/tts/sync',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    'X-API-KEY': 'my API key here'
  },
  data: {
    speed: 1,
    text: 'welcome to edana text to voice conversion',
    speaker: '63b40772241a82001d51b8ec',
    speakerStyle: '63b40772241a82001d51b8ed'
  },
  timeout: 60000 // Set timeout to 10 seconds
};

const response = await axios.request(options);