Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ from scipy.io.wavfile import write
|
|
12 |
|
13 |
def analyze_song(mp3_file):
|
14 |
# Call the transcription function and get the transcription
|
15 |
-
|
16 |
|
17 |
os.makedirs("out", exist_ok=True)
|
18 |
write('test.wav', mp3_file[0], mp3_file[1])
|
@@ -24,6 +24,7 @@ def analyze_song(mp3_file):
|
|
24 |
'file': open('test.wav', 'rb'),
|
25 |
}
|
26 |
result = requests.post('https://api.audd.io/', data=data, files=files)
|
|
|
27 |
if result is not None:
|
28 |
artist = result.json()['result']['artist']
|
29 |
title = result.json()['result']['title']
|
|
|
12 |
|
13 |
def analyze_song(mp3_file):
|
14 |
# Call the transcription function and get the transcription
|
15 |
+
# Pass the mp3 filename to transcript.py
|
16 |
|
17 |
os.makedirs("out", exist_ok=True)
|
18 |
write('test.wav', mp3_file[0], mp3_file[1])
|
|
|
24 |
'file': open('test.wav', 'rb'),
|
25 |
}
|
26 |
result = requests.post('https://api.audd.io/', data=data, files=files)
|
27 |
+
transcription = transcribe_audio('test.wav')
|
28 |
if result is not None:
|
29 |
artist = result.json()['result']['artist']
|
30 |
title = result.json()['result']['title']
|