Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
main.py
CHANGED
@@ -42,6 +42,7 @@ def download(url):
|
|
42 |
return info["id"] + ".wav"
|
43 |
|
44 |
|
|
|
45 |
def asr_mlx(wav_file):
|
46 |
result = mlx_whisper.transcribe(
|
47 |
wav_file,
|
@@ -58,6 +59,8 @@ def asr_cpp(wav_file):
|
|
58 |
# print(wav_file)
|
59 |
whisper.transcribe(wav_file, diarize=True)
|
60 |
whisper.output(output_csv=True, output_jsn=True, output_lrc=True, output_srt=True, output_txt=True, output_vtt=True, log_score=True)
|
|
|
|
|
61 |
|
62 |
def asr_fast(wav_file):
|
63 |
from faster_whisper import WhisperModel
|
@@ -92,8 +95,8 @@ with gr.Blocks() as demo:
|
|
92 |
# fetch video from url, and transcibe to text
|
93 |
---
|
94 |
|
95 |
-
running very poor server with performance, maybe 1.5x time cost with orignal video processing.
|
96 |
-
try yourself locally if your have macbook with silicon or high performance GPU.
|
97 |
<https://gist.github.com/yanyaoer/5cc7b0dd6729f306ad3cb740d501cabd#file-0-video2text-py>
|
98 |
|
99 |
""")
|
|
|
42 |
return info["id"] + ".wav"
|
43 |
|
44 |
|
45 |
+
'''
|
46 |
def asr_mlx(wav_file):
|
47 |
result = mlx_whisper.transcribe(
|
48 |
wav_file,
|
|
|
59 |
# print(wav_file)
|
60 |
whisper.transcribe(wav_file, diarize=True)
|
61 |
whisper.output(output_csv=True, output_jsn=True, output_lrc=True, output_srt=True, output_txt=True, output_vtt=True, log_score=True)
|
62 |
+
'''
|
63 |
+
|
64 |
|
65 |
def asr_fast(wav_file):
|
66 |
from faster_whisper import WhisperModel
|
|
|
95 |
# fetch video from url, and transcibe to text
|
96 |
---
|
97 |
|
98 |
+
running very poor server with performance, maybe 1.5x time cost with orignal video processing.
|
99 |
+
try yourself locally if your have macbook with silicon or high performance GPU.
|
100 |
<https://gist.github.com/yanyaoer/5cc7b0dd6729f306ad3cb740d501cabd#file-0-video2text-py>
|
101 |
|
102 |
""")
|