Discussions

Ask a Question
Back to All

Custom voices not working again.

Everything was working well until yesterday but again it is throwing Internal Server Error:

{  
  "kind": "UnknownError",  
  "description": "Internal Server Error"  
}
import requests

url = "https://api.d-id.com/talks/streams/strm_ABC"

payload = {
    "script": {
        "type": "text",
        "subtitles": "false",
        "provider": {
            "type": "elevenlabs",
            "voice_id": "..."
        },
        "ssml": "false",
        "input": "This is an example."
    },
    "config": {
        "fluent": "false",
        "pad_audio": "0.0"
    },
    "session_id": "..."
}
headers = {
    "accept": "application/json",
    "x-api-key-external": "{\"elevenlabs\": \"...\"}",
    "content-type": "application/json",
    "authorization": "Basic ..."
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

PS: I have tested on multiple session_id and stream_id