Eleven Labs Voice Issue
# support
w
Been trying to get 11labs voice to work, but having a few issues. Created the assistant in the dashboard for testing and sent the calls fine. However, when I try to use it in my own application I get a 400 error everytime. Here is the assistant:
Copy code
python
assistant_template = {
    "backgroundSound": "office",
    "clientMessages": [
        "transcript", "hang", "function-call", "speech-update", "metadata",
        "conversation-update"
    ],
    "dialKeypadFunctionEnabled": False,
    "endCallFunctionEnabled": False,
    "endCallMessage": "Thanks very much for your time!",
    "firstMessage": "",
    "hipaaEnabled": False,
    "llmRequestDelaySeconds": 0.3,
    "maxDurationSeconds": 1800,
    "model": {         
      "functions": [
         {
            "name": "get_availability",
            "description": "This is a function to get the time slots for available appointments. Use this when a prospect has agreed to a meeting or call."
        }
      ],
      "maxTokens": 525,
      "messages": [{
          "content": "",
          "role": "system",
        }],
      "model": "mixtral-8x7b-32768",
      "provider": "groq",
      "temperature": 0.3
    },
    "numWordsToInterruptAssistant": 2,
    "recordingEnabled": True,
    "responseDelaySeconds": 0.9,
    "serverMessages": ["end-of-call-report", "status-update", "hang", "function-call"],
    "serverUrl": SERVER_URL,
    "silenceTimeoutSeconds": 30,
    "transcriber": {
        "keywords": ["Infinilab"],
        "language": "en",
        "model": "nova-2",
        "provider": "deepgram"
    },
    "voice": {
        "provider": "11labs",
        "voiceId": "burt"
    },
  "voicemailDetectionEnabled": True,
}
Other voices work as expected, however the issue seems to only happen with 11labs. Tried a variety of voices using both preset voice options and 11 labs voice id but still doesn't resolve the issue.
v
Hi @westy412, I'm an AI assistant for Vapi. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions.
s
call_id?
w
Here is one of the calls that I sent using the dashboard: 59d52344-2f86-42d4-b720-f4de11adc61f However the ones that were getting a 400 error have not been registered. From looking at the API docs I can't seem to find why I should be getting a 400 error with 11labs. As far as I know the assistant is formatted correctly as if I change nothing else apart from the voice it works fine. For example:
Copy code
python
"voice": {
        "provider": "openai",
        "voiceId": "nova"
    },
Also tried this to get 11labs to work:
Copy code
python
"voice": {
        "provider": "11labs",
        "voiceId": "KaJWDrV3K2SAk5HGQWB2"
    },
s
@westy412 Basically, this is the error that I can see in the logs. Can you send me your demo link in dm? šŸ”“ 12:09:46:539 POST /call/phone, BadRequestException 400 Response: { \"message\": [ \"assistant.voice.provider must be one of the following values: 11labs, playht, rime-ai, deepgram, openai, azure, lmnt, neets\" ], \"error\": \"Bad Request\", \"statusCode\": 400 }
w
Sent DM!