David Attenborough narrates your life
Go to file
Matthew Gennings cb86fbd47d chore: added note to .gitignore 2024-07-22 16:43:07 -05:00
assets first commit 2023-11-07 10:27:35 -05:00
frames commit empty frames folder to save pictures 2023-11-15 22:44:40 +00:00
.gitignore chore: added note to .gitignore 2024-07-22 16:43:07 -05:00
README.md Updated README with .env file instructions 2024-01-09 11:34:08 -06:00
capture.py feat: Update narrator.py and capture.py to reflect ElevenLabs API updates 2024-07-22 16:43:07 -05:00
narrator.py feat: Update narrator.py and capture.py to reflect ElevenLabs API updates 2024-07-22 16:43:07 -05:00
requirements.txt feat: Update narrator.py and capture.py to reflect ElevenLabs API updates 2024-07-22 16:43:07 -05:00

README.md

David Attenborough narrates your life.

https://twitter.com/charliebholtz/status/1724815159590293764

Want to make your own AI app?

Check out Replicate. We make it easy to run machine learning models with an API.

Setup

Clone this repo, and setup and activate a virtualenv:

python3 -m pip install virtualenv
python3 -m virtualenv venv
source venv/bin/activate

Then, install the dependencies: pip install -r requirements.txt

Make a Replicate, OpenAI, and ElevenLabs account and set your tokens:

Setting Up Environment Variables

Instead of setting your tokens directly in the terminal, we'll use a .env file to manage them securely. Follow these steps:

  1. Create a file named .env in the root directory of your project.

  2. Add your API keys and voice ID to the .env file in the following format:

    OPENAI_API_KEY=your_openai_api_key
    ELEVENLABS_API_KEY=your_elevenlabs_api_key
    ELEVENLABS_VOICE_ID=your_elevenlabs_voice_id
    

    Replace your_openai_api_key, your_elevenlabs_api_key, and your_elevenlabs_voice_id with your actual keys and ID.

  3. The python-dotenv package (already included in requirements.txt) will load these variables automatically.

Note: Ensure that .env is listed in your .gitignore file to keep your API keys secure. Make a new voice in Eleven and get the voice id of that voice using their get voices API, or by clicking the flask icon next to the voice in the VoiceLab tab.

export ELEVENLABS_VOICE_ID=<voice-id>

Run it!

In on terminal, run the webcam capture:

python capture.py

In another terminal, run the narrator:

python narrator.py