Actually set Elevenlabs API key from environment variable

This commit is contained in:
Gabor Cselle 2023-11-17 12:30:59 -08:00
parent b2b76702b3
commit f6ccf6f780
1 changed files with 2 additions and 1 deletions

View File

@ -5,10 +5,11 @@ import json
import time
import simpleaudio as sa
import errno
from elevenlabs import generate, play, voices
from elevenlabs import generate, play, set_api_key, voices
client = OpenAI()
set_api_key(os.environ.get("ELEVENLABS_API_KEY"))
def encode_image(image_path):
while True: