Delik commited on
Commit
5eede9e
·
verified ·
1 Parent(s): 8289149

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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(audio)
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")