From e057fc15025ba8c0c9542f638e0eaa192d32edd9 Mon Sep 17 00:00:00 2001 From: Freddy Boulton Date: Fri, 20 Dec 2024 15:15:07 -0500 Subject: [PATCH] librosa (#44) --- backend/gradio_webrtc/reply_on_stopwords.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/gradio_webrtc/reply_on_stopwords.py b/backend/gradio_webrtc/reply_on_stopwords.py index 9ebc782..2611538 100644 --- a/backend/gradio_webrtc/reply_on_stopwords.py +++ b/backend/gradio_webrtc/reply_on_stopwords.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 7f5d68a..4f8ad80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" [project] name = "gradio_webrtc" -version = "0.0.24" +version = "0.0.25" description = "Stream images in realtime with webrtc" readme = "README.md" license = "apache-2.0"