diff --git a/README.md b/README.md index 33f9b66..c10bdcb 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,19 @@ export OPENAI_API_KEY= export ELEVENLABS_API_KEY= ``` -Make a new voice in Eleven and get the voice id of that voice using their [get voices](https://elevenlabs.io/docs/api-reference/voices) API. +Make a new voice in Eleven and get the voice id of that voice using their [get voices](https://elevenlabs.io/docs/api-reference/voices) API, or by clicking the flask icon next to the voice in the VoiceLab tab. + +``` +export ELEVENLABS_VOICE_ID= +``` ## Run it! +In on terminal, run the webcam capture: ```bash python capture.py ``` -In one terminal. In the other, run the narrator: +In another terminal, run the narrator: ```bash python narrator.py diff --git a/narrator.py b/narrator.py index 0435b47..2c71038 100644 --- a/narrator.py +++ b/narrator.py @@ -24,7 +24,7 @@ def encode_image(image_path): def play_audio(text): - audio = generate(text=text, voice="ENfvYmv6CRqDodDZTieQ", model="eleven_turbo_v2") + audio = generate(text, voice=os.environ.get("ELEVENLABS_VOICE_ID")) unique_id = base64.urlsafe_b64encode(os.urandom(30)).decode("utf-8").rstrip("=") dir_path = os.path.join("narration", unique_id)