Spaces:
Runtime error
Runtime error
Commit
·
c2c329d
1
Parent(s):
e9b4267
Update asr.py
Browse files
asr.py
CHANGED
@@ -53,7 +53,7 @@ def detect_language(audio):
|
|
53 |
# inputs_lid = processor_lid(audio, sampling_rate=16_000, return_tensors="pt")
|
54 |
with torch.no_grad():
|
55 |
start_time_lid = time.time()
|
56 |
-
outputs_lid = model_lid(**
|
57 |
end_time = time.time()
|
58 |
# print(end_time-start_time," sec")
|
59 |
lang_id = torch.argmax(outputs_lid, dim=-1)[0].item()
|
|
|
53 |
# inputs_lid = processor_lid(audio, sampling_rate=16_000, return_tensors="pt")
|
54 |
with torch.no_grad():
|
55 |
start_time_lid = time.time()
|
56 |
+
outputs_lid = model_lid(**inputs).logits
|
57 |
end_time = time.time()
|
58 |
# print(end_time-start_time," sec")
|
59 |
lang_id = torch.argmax(outputs_lid, dim=-1)[0].item()
|