qqwjq1981 commited on
Commit
d8b81e4
·
verified ·
1 Parent(s): c88bca8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -131,14 +131,11 @@ logger = logging.getLogger(__name__)
131
  logger.info(f"MoviePy Version: {moviepy.__version__}")
132
 
133
  def segment_background_audio(audio_path, output_path="background_segments.wav"):
134
-
135
  # Step 2: Initialize pyannote voice activity detection pipeline (you need Hugging Face token)
136
-
137
  pipeline = Pipeline.from_pretrained(
138
  "pyannote/voice-activity-detection",
139
- use_auth_token=HUGGINGFACE_TOKEN
140
  )
141
-
142
  # Step 3: Run VAD to get speech segments
143
  vad_result = pipeline(audio_path)
144
  print(f"Detected speech segments: {vad_result}")
 
131
  logger.info(f"MoviePy Version: {moviepy.__version__}")
132
 
133
  def segment_background_audio(audio_path, output_path="background_segments.wav"):
 
134
  # Step 2: Initialize pyannote voice activity detection pipeline (you need Hugging Face token)
 
135
  pipeline = Pipeline.from_pretrained(
136
  "pyannote/voice-activity-detection",
137
+ use_auth_token=hf_api_key
138
  )
 
139
  # Step 3: Run VAD to get speech segments
140
  vad_result = pipeline(audio_path)
141
  print(f"Detected speech segments: {vad_result}")