Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ from transformers import AutoTokenizer, VitsModel, set_seed, AutoModelForCausalL
|
|
12 |
from nemo.collections.asr.models import ASRModel
|
13 |
from nemo.collections.asr.parts.utils.streaming_utils import FrameBatchMultiTaskAED
|
14 |
from nemo.collections.asr.parts.utils.transcribe_utils import get_buffered_pred_feat_multitaskAED
|
15 |
-
|
16 |
|
17 |
torch.random.manual_seed(0)
|
18 |
proc_model_name = "microsoft/Phi-3-mini-4k-instruct"
|
@@ -73,8 +73,10 @@ def convert_audio(audio_filepath, tmpdir, utt_id):
|
|
73 |
|
74 |
def transcribe(audio_filepath):
|
75 |
|
|
|
|
|
76 |
if audio_filepath is None:
|
77 |
-
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
|
78 |
|
79 |
utt_id = uuid.uuid4()
|
80 |
with tempfile.TemporaryDirectory() as tmpdir:
|
|
|
12 |
from nemo.collections.asr.models import ASRModel
|
13 |
from nemo.collections.asr.parts.utils.streaming_utils import FrameBatchMultiTaskAED
|
14 |
from nemo.collections.asr.parts.utils.transcribe_utils import get_buffered_pred_feat_multitaskAED
|
15 |
+
import time
|
16 |
|
17 |
torch.random.manual_seed(0)
|
18 |
proc_model_name = "microsoft/Phi-3-mini-4k-instruct"
|
|
|
73 |
|
74 |
def transcribe(audio_filepath):
|
75 |
|
76 |
+
print(audio_filepath)
|
77 |
+
time.sleep(2)
|
78 |
if audio_filepath is None:
|
79 |
+
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone. \nIf the microphone already has audio, please wait a few moments for it to upload properly")
|
80 |
|
81 |
utt_id = uuid.uuid4()
|
82 |
with tempfile.TemporaryDirectory() as tmpdir:
|