Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,10 +96,13 @@ def transcribe(audio_path, model_name):
|
|
| 96 |
|
| 97 |
global pipe
|
| 98 |
if model_name != pipe.model.name_or_path:
|
|
|
|
|
|
|
| 99 |
pipe = load_pipeline(model_name)
|
| 100 |
-
|
|
|
|
| 101 |
start_time = time.time() # Record the start time
|
| 102 |
-
print(str(time.time())+' start
|
| 103 |
# Load the audio file and calculate its duration
|
| 104 |
audio = mp.AudioFileClip(audio_path)
|
| 105 |
audio_duration = audio.duration
|
|
|
|
| 96 |
|
| 97 |
global pipe
|
| 98 |
if model_name != pipe.model.name_or_path:
|
| 99 |
+
print("old model is:"+ pipe.model.name_or_path )
|
| 100 |
+
print(str(time.time())+' start load model ' + model_name)
|
| 101 |
pipe = load_pipeline(model_name)
|
| 102 |
+
print(str(time.time())+' finished load model ' + model_name)
|
| 103 |
+
|
| 104 |
start_time = time.time() # Record the start time
|
| 105 |
+
print(str(time.time())+' start processing and set recording start time point')
|
| 106 |
# Load the audio file and calculate its duration
|
| 107 |
audio = mp.AudioFileClip(audio_path)
|
| 108 |
audio_duration = audio.duration
|