NickVerri commited on
Commit
381e053
·
verified ·
1 Parent(s): 32eafa3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -131,8 +131,11 @@ if uploaded_file:
131
 
132
  # 1. Diarization
133
  try:
 
 
 
134
  pipeline = Pipeline.from_pretrained(
135
- "pyannote/speaker-diarization-3.1",
136
  use_auth_token=ACTIVE_HF_TOKEN
137
  )
138
 
@@ -141,6 +144,7 @@ if uploaded_file:
141
 
142
  diarization = pipeline("audio_optimized.m4a")
143
  except Exception as e:
 
144
  st.error(f"Diarization Error: {e}")
145
  st.stop()
146
 
 
131
 
132
  # 1. Diarization
133
  try:
134
+ # Fix for pyannote.audio 3.1+: strict argument passing
135
+ # We instantiate with just the token, letting the library resolve the version
136
+ # or using the explicit 'pyannote/speaker-diarization-3.1' model ID if needed
137
  pipeline = Pipeline.from_pretrained(
138
+ "pyannote/speaker-diarization-3.1",
139
  use_auth_token=ACTIVE_HF_TOKEN
140
  )
141
 
 
144
 
145
  diarization = pipeline("audio_optimized.m4a")
146
  except Exception as e:
147
+ # Detailed error message for debugging
148
  st.error(f"Diarization Error: {e}")
149
  st.stop()
150