laxsvips commited on
Commit
5fd97fc
·
1 Parent(s): c56a767

Update audio.py

Browse files
Files changed (1) hide show
  1. audio.py +3 -1
audio.py CHANGED
@@ -1,8 +1,10 @@
1
  from elevenlabs import voices, generate, set_api_key, UnauthenticatedRateLimitError
2
  import numpy as np
3
  import gradio as gr
 
4
 
5
- set_api_key(ELEVEN_API_KEY)
 
6
 
7
  def pad_buffer(audio):
8
  # Pad buffer to multiple of 2 bytes
 
1
  from elevenlabs import voices, generate, set_api_key, UnauthenticatedRateLimitError
2
  import numpy as np
3
  import gradio as gr
4
+ import OS
5
 
6
+ eleven_api_key = os.getenv('ELEVEN_API_KEY')
7
+ set_api_key(eleven_api_key)
8
 
9
  def pad_buffer(audio):
10
  # Pad buffer to multiple of 2 bytes