mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
librosa (#44)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user