mclemcrew commited on
Commit
c3bc466
·
1 Parent(s): 3228503

update to 30 seconds

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -94,10 +94,10 @@ def process_audio_file(audio_path):
94
  # Load and resample audio
95
  audio_data, sr = librosa.load(audio_path, sr=target_sr)
96
 
97
- # Limit to 8 seconds for better performance
98
- max_samples = 8 * target_sr
99
  if len(audio_data) > max_samples:
100
- logger.info(f"Truncating audio to 8 seconds")
101
  audio_data = audio_data[:max_samples]
102
 
103
  return audio_data
@@ -265,7 +265,7 @@ def create_interface():
265
  type="filepath",
266
  sources=["upload", "microphone"]
267
  )
268
- gr.Markdown("*Upload an audio file (WAV or MP3, 8 seconds will be analyzed)*")
269
 
270
  # Set audio button
271
  set_audio_btn = gr.Button("Set Audio Track", variant="primary")
 
94
  # Load and resample audio
95
  audio_data, sr = librosa.load(audio_path, sr=target_sr)
96
 
97
+ # Limit to 30 seconds for better performance
98
+ max_samples = 30 * target_sr
99
  if len(audio_data) > max_samples:
100
+ logger.info(f"Truncating audio to 30 seconds")
101
  audio_data = audio_data[:max_samples]
102
 
103
  return audio_data
 
265
  type="filepath",
266
  sources=["upload", "microphone"]
267
  )
268
+ gr.Markdown("*Upload an audio file (WAV or MP3, 30 seconds will be analyzed)*")
269
 
270
  # Set audio button
271
  set_audio_btn = gr.Button("Set Audio Track", variant="primary")