Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -20,11 +20,11 @@ languages = list(target_lang_options.keys())
|
|
20 |
|
21 |
|
22 |
# Transcribe audio using custom model
|
23 |
-
def transcribe_audio(input_file, language,
|
24 |
-
|
25 |
-
chunk_length_s=10, stride_length_s=(4, 2), return_timestamps="word"):
|
26 |
|
27 |
|
|
|
28 |
target_lang_code = target_lang_options[target_lang_code]
|
29 |
|
30 |
# Determine the model_id based on the language
|
|
|
20 |
|
21 |
|
22 |
# Transcribe audio using custom model
|
23 |
+
def transcribe_audio(input_file, language,chunk_length_s=10,
|
24 |
+
stride_length_s=(4, 2), return_timestamps="word"):
|
|
|
25 |
|
26 |
|
27 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
28 |
target_lang_code = target_lang_options[target_lang_code]
|
29 |
|
30 |
# Determine the model_id based on the language
|