Add-Vishnu commited on
Commit
bf80eba
·
1 Parent(s): 367ca12

Added wine in front of command

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -24,7 +24,14 @@ def transcribe(audio):
24
  temp_audio_path = temp_audio.name
25
  sf.write(temp_audio_path, y_resampled, 16000)
26
 
27
- command = rf"""'./whisper_blas_bin_v1_3_0/main.exe' -m './whisper_blas_bin_v1_3_0/models/ggml-model-whisper-small.en.bin' -osrt -f '{temp_audio_path}' -nt"""
 
 
 
 
 
 
 
28
 
29
  start_time = time.time()
30
  result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
 
24
  temp_audio_path = temp_audio.name
25
  sf.write(temp_audio_path, y_resampled, 16000)
26
 
27
+
28
+ # command = r"""wine './whisper_blas_bin_v1_3_0/main.exe' -h"""
29
+ wine_command = """sudo apt-get install wine"""
30
+ command2 = """chmod +777 ./whisper_blas_bin_v1_3_0/main.exe"""
31
+ wine_c = subprocess.run(wine_command,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, text=True)
32
+ perm = subprocess.run(command2, shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, text=True)
33
+ # result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
34
+ command = rf"""wine './whisper_blas_bin_v1_3_0/main.exe' -m './whisper_blas_bin_v1_3_0/models/ggml-model-whisper-small.en.bin' -osrt -f '{temp_audio_path}' -nt"""
35
 
36
  start_time = time.time()
37
  result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)