Spaces:
Running
Running
fixed
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import re
|
|
6 |
import numpy as np
|
7 |
import os
|
8 |
import gradio as gr
|
|
|
9 |
|
10 |
openai.api_key = os.environ.get("OPENAI_API_KEY")
|
11 |
|
@@ -128,7 +129,7 @@ def generate_rhythm(query, state):
|
|
128 |
# loop x4
|
129 |
audio_data = np.tile(audio_data, 4)
|
130 |
except:
|
131 |
-
audio_data =
|
132 |
|
133 |
return [(SR, audio_data), text_output]
|
134 |
# %%
|
|
|
6 |
import numpy as np
|
7 |
import os
|
8 |
import gradio as gr
|
9 |
+
import librosa
|
10 |
|
11 |
openai.api_key = os.environ.get("OPENAI_API_KEY")
|
12 |
|
|
|
129 |
# loop x4
|
130 |
audio_data = np.tile(audio_data, 4)
|
131 |
except:
|
132 |
+
audio_data = librosa.tone(440, duration=1)
|
133 |
|
134 |
return [(SR, audio_data), text_output]
|
135 |
# %%
|