Awell00 commited on
Commit
7e68a9b
·
verified ·
1 Parent(s): 3bc754b

fix: correct MP3 filename formatting and extension duplication

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -226,8 +226,8 @@ def combine_stems_for_all(input_dir, output_format="mp3"):
226
  # Trim silence at the end
227
  trimmed_combined = trim_silence_at_end(combined)
228
 
229
- # Set MP3 as the output format
230
- output_file = os.path.join(subdir, f"{song_name}.{output_format}")
231
 
232
  try:
233
  # Export combined audio to MP3
 
226
  # Trim silence at the end
227
  trimmed_combined = trim_silence_at_end(combined)
228
 
229
+ # Format the output file name correctly, ensuring no extra space and only one .mp3 extension
230
+ output_file = os.path.join(subdir, f"{song_name}.{output_format.lower()}")
231
 
232
  try:
233
  # Export combined audio to MP3