Discussions

Ask a Question
Back to All

Create a talk API sometimes not working with the line break

Here is my request

{
  'source_url': 's3://d-id-images-prod/auth0|65781e5e6edd085621d1e18c/img_En2uPfA-4wThPPQ6P7nvC/talk.jpg',
  'script': {
    'type': 'text',
    'input': '你今 天是上班还是休息呢?因为我\n们下班时间比较晚,要到晚上 11 点的,你一般几点下班 呢',
    'subtitles': 'false',
    'provider': {
      'type': 'microsoft',
      'voice_id': 'zh-CN-XiaochenNeural'
    },
    'ssml': 'false'
  },
  'config': {
    'result_format': 'mp4'
  }
}

You can see the line break code - \n in the input field

This request works sometimes but it doesn't work in most of the trials