mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 09:59:20 +08:00
fx
This commit is contained in:
6
utils.py
6
utils.py
@@ -224,3 +224,9 @@ def single_audio_stream(model, audio, onnx=False, trig_sum=0.26,
|
||||
if state[0]:
|
||||
states.append(state[0])
|
||||
yield states
|
||||
|
||||
def collect_speeches(tss, wav):
|
||||
speech_chunks = []
|
||||
for i in tss:
|
||||
speech_chunks.append(wav[i['start']: i['end']])
|
||||
return torch.cat(speech_chunks)
|
||||
|
||||
Reference in New Issue
Block a user