Update custom_interface_app.py
Browse files- custom_interface_app.py +2 -4
custom_interface_app.py
CHANGED
@@ -201,8 +201,7 @@ class ASR(Pretrained):
|
|
201 |
|
202 |
# Fake a batch for the segment
|
203 |
batch = segment_tensor.unsqueeze(0).to(device)
|
204 |
-
|
205 |
-
rel_length = torch.tensor([1.0], dtype=torch.float16).to(device)
|
206 |
|
207 |
# Pass the segment through the ASR model
|
208 |
segment_output = self.encode_batch_whisper(device, batch, rel_length)
|
@@ -211,8 +210,7 @@ class ASR(Pretrained):
|
|
211 |
waveform = torch.tensor(waveform).to(device)
|
212 |
waveform = waveform.to(device)
|
213 |
batch = waveform.unsqueeze(0)
|
214 |
-
|
215 |
-
rel_length = torch.tensor([1.0], dtype=torch.float16).to(device)
|
216 |
outputs = self.encode_batch_whisper(device, batch, rel_length)
|
217 |
yield outputs
|
218 |
|
|
|
201 |
|
202 |
# Fake a batch for the segment
|
203 |
batch = segment_tensor.unsqueeze(0).to(device)
|
204 |
+
rel_length = torch.tensor([1.0]).to(device)
|
|
|
205 |
|
206 |
# Pass the segment through the ASR model
|
207 |
segment_output = self.encode_batch_whisper(device, batch, rel_length)
|
|
|
210 |
waveform = torch.tensor(waveform).to(device)
|
211 |
waveform = waveform.to(device)
|
212 |
batch = waveform.unsqueeze(0)
|
213 |
+
rel_length = torch.tensor([1.0]).to(device)
|
|
|
214 |
outputs = self.encode_batch_whisper(device, batch, rel_length)
|
215 |
yield outputs
|
216 |
|