Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import soundfile as sf
|
|
3 |
import os
|
4 |
import spaces
|
5 |
|
6 |
-
|
7 |
|
8 |
|
9 |
def get_tmp_path(file_name: str):
|
@@ -14,7 +14,7 @@ def get_tmp_path(file_name: str):
|
|
14 |
|
15 |
@spaces.GPU
|
16 |
def process_audio(audio_file):
|
17 |
-
|
18 |
|
19 |
gr.Info("Writing response")
|
20 |
target_path = get_tmp_path("processed_audio.wav")
|
|
|
3 |
import os
|
4 |
import spaces
|
5 |
|
6 |
+
from s2s import generate
|
7 |
|
8 |
|
9 |
def get_tmp_path(file_name: str):
|
|
|
14 |
|
15 |
@spaces.GPU
|
16 |
def process_audio(audio_file):
|
17 |
+
result_audio_arr, sample_rate = generate(audio_file, lambda msg: gr.Info(msg))
|
18 |
|
19 |
gr.Info("Writing response")
|
20 |
target_path = get_tmp_path("processed_audio.wav")
|