|
|
|
@@ -36,6 +36,7 @@ def main(): |
|
|
|
threshold=THRESHOLD, |
|
|
|
min_speech_duration_ms=MIN_SPEECH_DURATION_MS, |
|
|
|
min_silence_duration_ms=MIN_SILENCE_DURATION_MS, |
|
|
|
sampling_rate=sr, |
|
|
|
) |
|
|
|
|
|
|
|
# Check ig there is timestamp |
|
|
|
@@ -48,8 +49,8 @@ def main(): |
|
|
|
node.send_output( |
|
|
|
"timestamp_start", |
|
|
|
pa.array([speech_timestamps[-1]["start"]]), |
|
|
|
metadata={"sample_rate": sr}, |
|
|
|
) |
|
|
|
continue |
|
|
|
audio = audio[0 : speech_timestamps[-1]["end"]] |
|
|
|
node.send_output("audio", pa.array(audio), metadata={"sample_rate": sr}) |
|
|
|
last_audios = [audio[speech_timestamps[-1]["end"] :]] |
|
|
|
|