Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def transcribe(stream, new_chunk):
|
|
33 |
sr, y = new_chunk
|
34 |
audio_int16 = np.frombuffer(y, dtype=np.int16)
|
35 |
audio_float32 = int2float(audio_int16)
|
36 |
-
vad_output =
|
37 |
if vad_output is not None and len(vad_output) != 0:
|
38 |
logger.debug("VAD: end of speech detected")
|
39 |
array = torch.cat(vad_output).cpu().numpy()
|
|
|
33 |
sr, y = new_chunk
|
34 |
audio_int16 = np.frombuffer(y, dtype=np.int16)
|
35 |
audio_float32 = int2float(audio_int16)
|
36 |
+
vad_output = vad_iterator(torch.from_numpy(audio_float32))
|
37 |
if vad_output is not None and len(vad_output) != 0:
|
38 |
logger.debug("VAD: end of speech detected")
|
39 |
array = torch.cat(vad_output).cpu().numpy()
|