Skip to content

Instantly share code, notes, and snippets.

@mberman84
Created November 22, 2023 17:26
Show Gist options
  • Save mberman84/35ea386df3e2d0054ba370d388f43710 to your computer and use it in GitHub Desktop.
Save mberman84/35ea386df3e2d0054ba370d388f43710 to your computer and use it in GitHub Desktop.
Voice Cloning for Narration
git clone https://github.com/cbh123/narrator
cd narrator
conda create -n narrator python=3.11
conda activate narrator
which python
python -m pip install -r requirements.txt
export ELEVENLABS_API_KEY={key}
export OPENAI_API_KEY={key}
python capture.py
# open new terminal
conda activate narrator
# clone a voice in eleven labs
# get the voice_id of the cloned voice (/docs/voices/Get_voices_v1_voices_get)
# put the cloned voice_id in the [narrator.py](http://narrator.py) code, line 27
# add import_api_key to import eleven labs (line 8)
# add set_api_key({key}) to line 9
python narrator.py
@smcady
Copy link

smcady commented Nov 27, 2023

Matt, thanks for this as always! On line 15 here, you're saying to add "import_api_key" to the elevenlabs import, but in the video you say at 5:56 to add "set_api_key", which I think is what you intended here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment