Spaces:
Runtime error
Runtime error
pengdaqian
commited on
Commit
·
0310e05
1
Parent(s):
7511e69
fix
Browse files- app.py +4 -2
- requirements.txt +2 -1
app.py
CHANGED
@@ -14,11 +14,11 @@ import gradio as gr
|
|
14 |
import librosa
|
15 |
import numpy as np
|
16 |
import soundfile
|
17 |
-
import random
|
18 |
from spleeter.separator import Separator
|
19 |
from spleeter.audio.adapter import AudioAdapter
|
20 |
from pydub import AudioSegment
|
21 |
import uuid
|
|
|
22 |
|
23 |
import logging
|
24 |
|
@@ -255,7 +255,9 @@ def auto_search(name):
|
|
255 |
|
256 |
if not os.path.exists(save_path):
|
257 |
return "Not Found", None
|
258 |
-
signal, sampling_rate = soundfile.read(save_path)
|
|
|
|
|
259 |
return "Found a music", (sampling_rate, signal)
|
260 |
|
261 |
|
|
|
14 |
import librosa
|
15 |
import numpy as np
|
16 |
import soundfile
|
|
|
17 |
from spleeter.separator import Separator
|
18 |
from spleeter.audio.adapter import AudioAdapter
|
19 |
from pydub import AudioSegment
|
20 |
import uuid
|
21 |
+
from audio2numpy import open_audio
|
22 |
|
23 |
import logging
|
24 |
|
|
|
255 |
|
256 |
if not os.path.exists(save_path):
|
257 |
return "Not Found", None
|
258 |
+
# signal, sampling_rate = soundfile.read(save_path)
|
259 |
+
signal, sampling_rate = open_audio(save_path)
|
260 |
+
|
261 |
return "Found a music", (sampling_rate, signal)
|
262 |
|
263 |
|
requirements.txt
CHANGED
@@ -15,4 +15,5 @@ librosa
|
|
15 |
pydub
|
16 |
musicdl
|
17 |
spleeter
|
18 |
-
yt-dlp
|
|
|
|
15 |
pydub
|
16 |
musicdl
|
17 |
spleeter
|
18 |
+
yt-dlp
|
19 |
+
audio2numpy
|