This commit is contained in:
Freddy Boulton
2024-12-20 15:15:07 -05:00
committed by GitHub
parent c45febf3bf
commit e057fc1502
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,6 @@ import logging
import re
from typing import Literal
import librosa
import numpy as np
from .reply_on_pause import (
@@ -75,6 +74,7 @@ class ReplyOnStopWords(ReplyOnPause):
self, audio: np.ndarray, sampling_rate: int, state: ReplyOnStopWordsState
) -> bool:
"""Take in the stream, determine if a pause happened"""
import librosa
duration = len(audio) / sampling_rate
if duration >= self.algo_options.audio_chunk_duration: