Decided on Parakeet ONNX Runtime. Works pretty great. Realtime voice chat possible now. UX lacking.
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user