I was getting the error:
Error invoking model response: ElevenLabs API request failed: Client error: `POST https://api.elevenlabs.io/v1/text-to-speech/` resulted in a `404 Not Found` response: {"detail":"Not Found"}
The root of this issue was that is was not able to pull a "voice_id", and the "voice" array key was blank. Just to get things working I added a hardcoded ID on these lines:
Line 239:
modules\contrib\elevenlabs\src\Plugin\AiProvider\ElevenlabsProvider.php
Line 184:
modules\contrib\elevenlabs\src\ElevenLabsApiService.php
Once those were added everything worked. I don't see anywhere to specifiy a "voice_id" and the code doesn't populate a default.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | elevenlabs-set_configuration-3542656-17.patch | 9.32 KB | andrewtur |
| #12 | Screenshot from 2026-03-02 11-56-45.png | 65.37 KB | andrewtur |
| #11 | Zrzut ekranu z 2026-02-27 17-31-14.png | 85.41 KB | henk |
| #11 | Zrzut ekranu z 2026-02-27 17-27-07.png | 69.28 KB | henk |
| #10 | elevenlabs-no_voice_being_passed-3542656-10.patch | 2.49 KB | andrewtur |
Issue fork elevenlabs-3542656
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
saurabhkanva commentedSet a default voice id as '21m00Tcm4TlvDq8ikWAM' which default for elevanlabs.
Comment #3
paulsheldrake commentedHello
Do you have a paid for account on ElevenLabs? It should be pulling all the voices that are setup in your profile on ElevenLabs
Comment #4
paulsheldrake commentedWhen creating the API key make sure it has access to the following:
Comment #5
paulsheldrake commentedComment #6
henk commentedI have same problem, API Key is proper but module didn't find /text-to-speech API url.
I see on documentation page that EU residence have different API link
wss://api.eu.residency.elevenlabs.io/v1/speech-to-text/realtimehttps://elevenlabs.io/docs/api-reference/speech-to-text/v-1-speech-to-te...
Comment #7
henk commentedI test on key without restriction and different url for EU residency and still have 404. So it is not URL.
I will debug it more.
Comment #8
andrewtur commentedHi, i'm having the same issue. The voice_id can't be set since there is no Form for it.
Also im getting php errors like:
all these error just state that the voice has not been set.
When I hardcode a voice I currently get a "402 paid_plan_required" cause im on a Free Plan and ElevenLabs has restriced the use of API Calls for Free Users
Comment #9
andrewtur commented@henk as far as i could tell this error
is a result of the missing voice_id since the url should be https://api.elevenlabs.io/v1/text-to-speech/:voice_id
see elevenlabs api documentation: https://elevenlabs.io/docs/api-reference/text-to-speech/convert
Comment #10
andrewtur commentedI could no longer apply the patch from #2 so I rerolled it with some minor changes.
Comment #11
henk commented@andrewtur when I setup field automator like a "Base mode" and add {{ context }}, setup Eleven Multilingual v2 instead of Default text to speech, it starts working without patch.
From my side it looks like it was configuration problem, some parameters was missing on default setup.
Comment #12
andrewtur commentedHi @henk, i cant see any of those form fields in the SettingsForm under admin/config/system/eleven-labs-settings.
When I to a look at the settingsForm.php of the elevenlabs module there is also only the api key as a setting.
The voice Id field is the one I added in the patch.
I'm only using elevenlabs for text to speech and have not got the ai automator submodule installed.
Comment #13
henk commentedYou need to install AI Automator module, then go to particular field settings e.g. File with Mp3 format and setup automator action for Text to speech.
Comment #14
andrewtur commentedHello henk,
thank you for the replay. I was not playing on using the ai automator but rather using a custom implementaion using the tts module.
I beleive this module should allow the user to set up the configuration without having to use a extra module enable to access the setting.
Do you agree ?
Comment #17
andrewtur commentedComment #18
henk commentedAgree, first impression about Drupal AI project and this integration with Elevenlabs, that is over complicated. But probably there are reason behind that. As I see it this module using architecture that is made by https://www.drupal.org/project/ai project. With benefits and downsides. Probably will be good to check before merge that your default config is working with field related config overriding in different place. We can choose multiple models and voices depend on use case on website, language selected etc.