elevenlabs dubbing

GRATIS CON POSSIBILITÀ DI UPGRADE
Da Thomcle | Aggiornamento a month ago | Artificial Intelligence/Machine Learning
Popolarità

8.9 / 10

Latenza

27,877ms

Livello di servizio

95%

Health Check

N/A

Torna a tutte le discussioni

Dubbing API returning Internal server error

Rapid account: Mario Pdo Kkamz A
mario-pdoKkamzA
4 months ago
def get_dubbed_audio(transcription, language, voice_name):
    url = "https://elevenlabs-dubbing1.p.rapidapi.com/dubbing"

    payload = {
        "audio_duration_seconds": 47.809886621315194,
        "elevenlabs_api_key": elevenlabs_key,
        "spoken_language": language,
        "transcription": transcription,
        "voice_name": voice_name
    }
    headers = {
        "content-type": "application/json",
        "X-RapidAPI-Key": "...",
        "X-RapidAPI-Host": "elevenlabs-dubbing1.p.rapidapi.com"
    }

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

    return response

Am I doing something wrong?

Rapid account: Thomcle
Thomcle Commented 4 months ago

The only error I can see is that you define the “voice_name” key in the playload, which hasn’t existed for a few days. Please replace the value of the key with “voice_id” and set it to the id of a voice (available in the json file of the enpoint /get_voices or at the end of the documentation page).

payload = {
“audio_duration_seconds”: 47.809886621315194,
“elevenlabs_api_key”: elevenlabs_key,
“spoken_language”: language,
“transcription”: transcription,
“voice_id”: voice_id
}

(Note that this allows you to use the API key of your elevenlabs account to access a wider range of voices than those indicated in the json file of available voices. Internal server error may occur for other reasons: please check that the value of each is indicated as requested.)

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti