Spaces:
Running
Running
Update audio_buffer_manager.py
Browse files- audio_buffer_manager.py +7 -0
audio_buffer_manager.py
CHANGED
@@ -229,6 +229,13 @@ class AudioBufferManager:
|
|
229 |
chunk.is_speech = not is_silence
|
230 |
chunk.energy_level = 1.0 - (silence_duration / detector.threshold_ms)
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
# Check for end of speech
|
233 |
if silence_duration > detector.threshold_ms:
|
234 |
log_info(
|
|
|
229 |
chunk.is_speech = not is_silence
|
230 |
chunk.energy_level = 1.0 - (silence_duration / detector.threshold_ms)
|
231 |
|
232 |
+
# Log every 50 chunks for debugging
|
233 |
+
if chunk.chunk_index % 50 == 0:
|
234 |
+
log_info(
|
235 |
+
f"🎤 Audio processing - Chunk: {chunk.chunk_index}, Silence: {is_silence}, Duration: {silence_duration}ms",
|
236 |
+
session_id=session_id
|
237 |
+
)
|
238 |
+
|
239 |
# Check for end of speech
|
240 |
if silence_duration > detector.threshold_ms:
|
241 |
log_info(
|