Decided on Parakeet ONNX Runtime. Works pretty great. Realtime voice chat possible now. UX lacking.

This commit is contained in:
2026-01-19 00:29:44 +02:00
parent 0a8910fff8
commit 362108f4b0
34 changed files with 4593 additions and 73 deletions

View File

@@ -293,6 +293,15 @@ class MikuVoiceSource(discord.AudioSource):
logger.debug("Sent flush command to TTS")
except Exception as e:
logger.error(f"Failed to send flush command: {e}")
async def clear_buffer(self):
"""
Clear the audio buffer without disconnecting.
Used when interrupting playback to avoid playing old audio.
"""
async with self.buffer_lock:
self.audio_buffer.clear()
logger.debug("Audio buffer cleared")