Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -11,9 +11,12 @@ pipeline = Pipeline.from_pretrained(
|
|
11 |
use_auth_token=os.environ['api'])
|
12 |
|
13 |
def process_audio(audio):
|
|
|
|
|
|
|
14 |
# Save the uploaded audio file to a temporary location
|
15 |
with open("temp.wav", "wb") as f:
|
16 |
-
f.write(
|
17 |
|
18 |
# Use the diarization pipeline to process the audio
|
19 |
diarization = pipeline("temp.wav")
|
|
|
11 |
use_auth_token=os.environ['api'])
|
12 |
|
13 |
def process_audio(audio):
|
14 |
+
# Extract the audio data from the tuple
|
15 |
+
audio_data, _ = audio
|
16 |
+
|
17 |
# Save the uploaded audio file to a temporary location
|
18 |
with open("temp.wav", "wb") as f:
|
19 |
+
f.write(audio_data)
|
20 |
|
21 |
# Use the diarization pipeline to process the audio
|
22 |
diarization = pipeline("temp.wav")
|