Suparnpreet commited on
Commit
8b73986
·
verified ·
1 Parent(s): 8db6f99

Update audioex.py

Browse files
Files changed (1) hide show
  1. audioex.py +6 -3
audioex.py CHANGED
@@ -12,9 +12,12 @@ def ex():
12
  print(mp4_file_path)
13
  os.rename(mp4_file_path, "video.mp4")
14
  print("Command started")
15
- subprocess.run("sudo apt install ffmpeg", shell=True)
 
16
  command2mp3 = "ffmpeg -i video.mp4 speech.mp3"
 
 
17
  command2wav = "ffmpeg -i speech.mp3 speech.wav"
18
- subprocess.run(command2mp3, shell=True)
19
- subprocess.run(command2wav, shell=True)
20
  print("Command ended")
 
12
  print(mp4_file_path)
13
  os.rename(mp4_file_path, "video.mp4")
14
  print("Command started")
15
+ result = subprocess.run("sudo apt install ffmpeg", capture_output=True, text=True, check=True)
16
+ print("Command Output of ffmpeg:\n", result.stdout)
17
  command2mp3 = "ffmpeg -i video.mp4 speech.mp3"
18
+ result1 = subprocess.run(command2mp3, capture_output=True, text=True, check=True)
19
+ print("Command Output of mp3:\n", result1.stdout)
20
  command2wav = "ffmpeg -i speech.mp3 speech.wav"
21
+ result2 = subprocess.run(command2wav, capture_output=True, text=True, check=True)
22
+ print("Command Output of wav:\n", result2.stdout)
23
  print("Command ended")