beweinreich commited on
Commit
e76095f
1 Parent(s): 83028a7

20s chunks and bugfix

Browse files
Files changed (2) hide show
  1. audio_analyzer.py +1 -1
  2. utils.py +1 -1
audio_analyzer.py CHANGED
@@ -70,7 +70,7 @@ class AudioAnalyzer:
70
  audio = audio[:600000]
71
 
72
  # Process in chunks to save memory
73
- chunk_size = 10000 # Process in 10-second chunks
74
  processed_audio = AudioSegment.empty()
75
 
76
  for i in tqdm(range(0, len(audio), chunk_size), desc="Processing audio"):
 
70
  audio = audio[:600000]
71
 
72
  # Process in chunks to save memory
73
+ chunk_size = 20000 # Process in 20-second chunks
74
  processed_audio = AudioSegment.empty()
75
 
76
  for i in tqdm(range(0, len(audio), chunk_size), desc="Processing audio"):
utils.py CHANGED
@@ -1,6 +1,6 @@
1
  import re
2
 
3
- def clean_trait(self, trait):
4
  # Remove line breaks, leading/trailing whitespace, and unnecessary dashes
5
  cleaned_trait = trait.replace('\n', '').strip()
6
  cleaned_trait = re.sub(r'^-+', '', cleaned_trait).strip()
 
1
  import re
2
 
3
+ def clean_trait(trait):
4
  # Remove line breaks, leading/trailing whitespace, and unnecessary dashes
5
  cleaned_trait = trait.replace('\n', '').strip()
6
  cleaned_trait = re.sub(r'^-+', '', cleaned_trait).strip()