khiem02 commited on
Commit
0cc2f74
verified
1 Parent(s): f5b3ad3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -54,18 +54,11 @@ def process_video(input_video_path, temp_dir="temp_dir"):
54
  def process_audio(file_path, temp_dir):
55
  # Load the audio file
56
  audio = AudioSegment.from_file(file_path)
57
-
58
- # Check and cut the audio if longer than 4 seconds
59
- max_duration = 8 * 1000 # 4 seconds in milliseconds
60
- if len(audio) > max_duration:
61
- audio = audio[:max_duration]
62
-
63
- # Save the processed audio in the temporary directory
64
  output_path = os.path.join(temp_dir, "trimmed_audio.wav")
65
  audio.export(output_path, format="wav")
66
-
67
- # Return the path to the trimmed file
68
- print(f"Processed audio saved at: {output_path}")
69
  return output_path
70
 
71
  import argparse
 
54
  def process_audio(file_path, temp_dir):
55
  # Load the audio file
56
  audio = AudioSegment.from_file(file_path)
57
+
58
+ # Kh么ng c岷痶 ng岷痭 audio n峄痑
 
 
 
 
 
59
  output_path = os.path.join(temp_dir, "trimmed_audio.wav")
60
  audio.export(output_path, format="wav")
61
+ print(f"Processed full audio saved at: {output_path}")
 
 
62
  return output_path
63
 
64
  import argparse