Spaces:
Sleeping
Sleeping
Update audio.py
Browse files
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 |
-
|
|
|
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
|