diff --git a/examples/voice-assistant/minimal_assistant.py b/examples/voice-assistant/minimal_assistant.py index 35e0dee8e..9f6b0c2b1 100644 --- a/examples/voice-assistant/minimal_assistant.py +++ b/examples/voice-assistant/minimal_assistant.py @@ -26,6 +26,7 @@ async def entrypoint(ctx: JobContext): llm=openai.LLM(), tts=openai.TTS(), chat_ctx=initial_ctx, + plotting=True, ) assistant.start(ctx.room) diff --git a/livekit-agents/livekit/agents/voice_assistant/plotter.py b/livekit-agents/livekit/agents/voice_assistant/plotter.py index 41a2cf349..1b5390be5 100644 --- a/livekit-agents/livekit/agents/voice_assistant/plotter.py +++ b/livekit-agents/livekit/agents/voice_assistant/plotter.py @@ -88,7 +88,7 @@ def _draw_plot(mp_cch): def _draw_cb(sp, pv): while True: - events = selector.select(timeout=0) + events = selector.select(timeout=0.01) if not events: break @@ -140,7 +140,7 @@ def _draw_cb(sp, pv): fig.canvas.draw() - timer = fig.canvas.new_timer(interval=33) + timer = fig.canvas.new_timer(interval=150) timer.add_callback(_draw_cb, sp, pv) timer.start() plt.show()