AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

speech mod doesn't work

Open imag1neArts opened this issue 1 year ago • 8 comments

The speech function does not work properly, although everything was installed correctly. I have entered the eleven labs api key and also the two api for the voice. Autogpt always uses the default voice.

imag1neArts avatar Apr 21 '23 14:04 imag1neArts

I had this problem as well I put the IDs in the wrong place and the code was commented out. Try this in the .env file.

### ELEVENLABS
## ELEVENLABS_API_KEY - Eleven Labs API key (Example: my-elevenlabs-api-key)
## ELEVENLABS_VOICE_1_ID - Eleven Labs voice 1 ID (Example: my-voice-id-1)
## ELEVENLABS_VOICE_2_ID - Eleven Labs voice 2 ID (Example: my-voice-id-2)
ELEVENLABS_API_KEY=your API Key
ELEVENLABS_VOICE_1_ID=21m00Tcm4TlvDq8ikWAM
ELEVENLABS_VOICE_2_ID=AZnzlk1XvdvUeBnXmlld

andrewbaisden avatar Apr 21 '23 15:04 andrewbaisden

The keys are already in the right place, but it doesn't work.

imag1neArts avatar Apr 21 '23 17:04 imag1neArts

they have updated the module now you need to use the voice name:

        voice_options = {
            "Rachel": "21m00Tcm4TlvDq8ikWAM",
            "Domi": "AZnzlk1XvdvUeBnXmlld",
            "Bella": "EXAVITQu4vr4xnSDxMaL",
            "Antoni": "ErXwobaYiN019PkySvjV",
            "Elli": "MF3mGyEYCl7XYWbV9V6O",
            "Josh": "TxGEqnHWrfWFTfGW9XjX",
            "Arnold": "VR6AewLTigWG4xSOukaG",
            "Adam": "pNInz6obpgDQGcFmaJgB",
            "Sam": "yoZ06aMxZJJ28mfd3POQ",
        }
        self._headers = {
            "Content-Type": "application/json",
            "xi-api-key": cfg.elevenlabs_api_key,
        }
        self._voices = default_voices.copy()
        if cfg.elevenlabs_voice_1_id in voice_options:
            cfg.elevenlabs_voice_1_id = voice_options[cfg.elevenlabs_voice_1_id]

So use the name instead

ELEVENLABS_VOICE_1_ID=Rachel

This module is a bit useless imo because you are limited to 10k token and run out quickly in free plan

gabkk avatar Apr 21 '23 17:04 gabkk

Thank you. Will try it out now.

10'000 tokens for eleven labs free Plan you mean?

imag1neArts avatar Apr 21 '23 19:04 imag1neArts

You can use the name or ID that's what it says in the readme file. I pulled the latest repo and both methods work.

they have updated the module now you need to use the voice name:

        voice_options = {
            "Rachel": "21m00Tcm4TlvDq8ikWAM",
            "Domi": "AZnzlk1XvdvUeBnXmlld",
            "Bella": "EXAVITQu4vr4xnSDxMaL",
            "Antoni": "ErXwobaYiN019PkySvjV",
            "Elli": "MF3mGyEYCl7XYWbV9V6O",
            "Josh": "TxGEqnHWrfWFTfGW9XjX",
            "Arnold": "VR6AewLTigWG4xSOukaG",
            "Adam": "pNInz6obpgDQGcFmaJgB",
            "Sam": "yoZ06aMxZJJ28mfd3POQ",
        }
        self._headers = {
            "Content-Type": "application/json",
            "xi-api-key": cfg.elevenlabs_api_key,
        }
        self._voices = default_voices.copy()
        if cfg.elevenlabs_voice_1_id in voice_options:
            cfg.elevenlabs_voice_1_id = voice_options[cfg.elevenlabs_voice_1_id]

So use the name instead

ELEVENLABS_VOICE_1_ID=Rachel

This module is a bit useless imo because you are limited to 10k token and run out quickly in free plan

andrewbaisden avatar Apr 21 '23 21:04 andrewbaisden

@imag1neArts the free plan is 10,000 characters per month. The starter plan is 30,000 characters per month and right now the first month is 80% Off. So that's about $1 for the first month and then $5 for the second month. It's worth paying for the first month which is less than a cup of coffee 😉

andrewbaisden avatar Apr 21 '23 21:04 andrewbaisden

Is this resolved?

ntindle avatar Apr 22 '23 09:04 ntindle

@andrewbaisden thank you for the informations 👍🏻

imag1neArts avatar Apr 22 '23 09:04 imag1neArts