Spaces:
Paused
Paused
Update websocket_handler.py
Browse files- websocket_handler.py +1 -1
websocket_handler.py
CHANGED
|
@@ -65,7 +65,7 @@ class AudioBuffer:
|
|
| 65 |
|
| 66 |
class SilenceDetector:
|
| 67 |
"""Detect silence in audio stream"""
|
| 68 |
-
def __init__(self, threshold_ms: int =
|
| 69 |
self.threshold_ms = threshold_ms
|
| 70 |
self.energy_threshold = energy_threshold
|
| 71 |
self.silence_start = None
|
|
|
|
| 65 |
|
| 66 |
class SilenceDetector:
|
| 67 |
"""Detect silence in audio stream"""
|
| 68 |
+
def __init__(self, threshold_ms: int = DEFAULT_SILENCE_THRESHOLD_MS, energy_threshold: float = DEFAULT_ENERGY_THRESHOLD):
|
| 69 |
self.threshold_ms = threshold_ms
|
| 70 |
self.energy_threshold = energy_threshold
|
| 71 |
self.silence_start = None
|