Spaces:
Runtime error
Runtime error
Commit ·
a30d551
1
Parent(s): a1048b6
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,18 +16,19 @@ perm = subprocess.run(command2, shell=True,stdout=subprocess.PIPE,stderr=subproc
|
|
| 16 |
# result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 17 |
# print("Wine Installation: ",wine_c)
|
| 18 |
print("Access Installation: ",perm)
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
print("
|
| 29 |
-
print("
|
| 30 |
-
print("
|
|
|
|
| 31 |
|
| 32 |
|
| 33 |
def resample_to_16k(audio, orig_sr):
|
|
@@ -48,8 +49,9 @@ def transcribe(audio):
|
|
| 48 |
|
| 49 |
|
| 50 |
# 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""" # English only
|
| 51 |
-
|
| 52 |
-
|
|
|
|
| 53 |
|
| 54 |
start_time = time.time()
|
| 55 |
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
|
|
|
| 16 |
# result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 17 |
# print("Wine Installation: ",wine_c)
|
| 18 |
print("Access Installation: ",perm)
|
| 19 |
+
# Fpr win32 instalattion while using medium model
|
| 20 |
+
# command3 = "apt install sudo"
|
| 21 |
+
# command4 = "dpkg --add-architecture i386"
|
| 22 |
+
# command5 = "apt-get update"
|
| 23 |
+
# command6 = "apt-get install wine32:i386"
|
| 24 |
+
# t1= subprocess.run(command3, shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, text=True)
|
| 25 |
+
# t2= subprocess.run(command4, shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, text=True)
|
| 26 |
+
# t3= subprocess.run(command5, shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, text=True)
|
| 27 |
+
# t4= subprocess.run(command6, shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE, text=True)
|
| 28 |
+
# print("T1: ",t1)
|
| 29 |
+
# print("T2: ",t2)
|
| 30 |
+
# print("T3: ",t3)
|
| 31 |
+
# print("T4: ",t4)
|
| 32 |
|
| 33 |
|
| 34 |
def resample_to_16k(audio, orig_sr):
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
# 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""" # English only
|
| 52 |
+
command = rf"""wine './whisper_blas_bin_v1_3_0/main.exe' -m './whisper_blas_bin_v1_3_0/models/ggml-model-whisper-base.bin' -osrt -f '{temp_audio_path}' -nt""" # Multilingual
|
| 53 |
+
# win32 error while using medium model
|
| 54 |
+
# command = rf"""wine './whisper_blas_bin_v1_3_0/main.exe' -m './whisper_blas_bin_v1_3_0/models/ggml-model-whisper-medium-q5_0.bin' -osrt -f '{temp_audio_path}' -nt""" # Multilingual
|
| 55 |
|
| 56 |
start_time = time.time()
|
| 57 |
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|