Spaces:
Sleeping
Sleeping
Update stf/stf-api-alternative/src/stf_alternative/inference.py
Browse files
stf/stf-api-alternative/src/stf_alternative/inference.py
CHANGED
@@ -141,7 +141,7 @@ def process_audio_chunk(audio_processor, audio_encoder, audio_chunk, device):
|
|
141 |
|
142 |
input_values = audio_processor(
|
143 |
audio_data, sampling_rate=16000, return_tensors="pt"
|
144 |
-
).
|
145 |
|
146 |
#with torch.no_grad():
|
147 |
logits = audio_encoder(input_values=input_values)
|
|
|
141 |
|
142 |
input_values = audio_processor(
|
143 |
audio_data, sampling_rate=16000, return_tensors="pt"
|
144 |
+
).to(device)["input_values"]
|
145 |
|
146 |
#with torch.no_grad():
|
147 |
logits = audio_encoder(input_values=input_values)
|