mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-04 17:39: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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user