Closed Anandsure closed 1 month ago
the same problem...,how to fix it? I use Azure speech
We have improvements to the voice assistant coming soon. You can try it with the following versions:
livekit-agents>=0.8.0.dev3
livekit-plugins-silero>=0.6.0.dev2
livekit-plugins-azure>=0.3.0.dev2
livekit-plugins-openai>=0.7.0.dev2
livekit-plugins-elevenlabs>=0.7.0.dev2
There are some slight breaking API changes for your agent entrypoint code. You can look here for reference: https://github.com/livekit/agents/blob/dev/examples/voice-assistant/minimal_assistant.py
Could you give that a try and see if you have the same issue?
@keepingitneil
not found
https://github.com/livekit/agents/blob/dev/examples/voice-assistant/minimal_assistant.py
the dev branch is not exits
Ahh this has been recently merged and the versions have been released. Here's the main branch link:
https://github.com/livekit/agents/blob/main/examples/voice-assistant/minimal_assistant.py
And all of the above versions are the same but without the .devX
suffix
kitt.py
{"message": "unhandled exception while running the job task\nTraceback (most recent call last):\n File \"E:\gitee\code\livekit-agents-0.8.0\examples\_deployed\kitt\kitt.py\", line 88, in entrypoint\n chat = rtc.ChatManager(ctx.room)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"C:\Python312\Lib\site-packages\livekit\rtc\chat.py\", line 39, in init\n self._lp = room.local_participant\n ^^^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'Room' object has no attribute 'local_participant'", "pid": 2768, "job_id": "AJ_ShiPzvtCuTsA", "timestamp": "2024-07-25T06:28:54.172341+00:00"}
livekit 0.12.0.dev1 livekit-agents 0.8.0 livekit-api 0.6.0 livekit-plugins-azure 0.3.0 livekit-plugins-openai 0.6.0 livekit-plugins-silero 0.6.0 livekit-protocol 0.6.0
minimal_assistant.py
{"message": "Error in _synthesize_answer_task\nTraceback (most recent call last):\n File \"C:\Python312\Lib\site-packages\livekit\agents\utils\log.py\", line 16, in async_fn_logs\n return await fn(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"C:\Python312\Lib\site-packages\livekit\agents\voice_assistant\voice_assistant.py\", line 455, in _synthesize_answer_task\n llm_stream = self._opts.will_synthesize_assistant_reply(self, copied_ctx)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"C:\Python312\Lib\site-packages\livekit\agents\voice_assistant\voice_assistant.py\", line 79, in _default_will_synthesize_assistant_reply\n return assistant.llm.chat(chat_ctx=chat_ctx, fnc_ctx=assistant.fnc_ctx)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTypeError: LLM.chat() got an unexpected keyword argument 'chat_ctx'", "pid": 15548, "job_id": "AJ_9djEYFdBsPkC", "timestamp": "2024-07-25T06:52:59.548455+00:00"}
@keepingitneil There are too many bugs, and the examples cannot run
Hey, it seems like the LLM plugins are not updated. Can you update livekit-plugins-openai to 0.7.0
@theomonnom and @keepingitneil
I'm using the latest plugins and the error still persists, interrupts don't work properly when using a stream adapter.
i even turned off preemptive synthesis, that doesn't seem to do anything really.
i also still see duplicate transcripts whenever using streamAdapter.
Hey on v0.8.0. Interruption doesn't rely on the SpeechToText at all. I'm unable to reproduce the issue, can you share more about it?
@theomonnom Using STT plugins that don't support streaming like openai-STT in conjunction with streamAdapter.
This is the particular scenario where interrupts fail.
please refer the above code snippet.
Hey, the duplicated speeches should be fixed in livekit-agents v0.8.3. I also tested using openai with the stream adapter and I was successfully able to interrupt the agent. Note that the interruption doesn't come from the STT but VAD.
For context:
When i run this setup with the voice assistant i've noticed a few things happen as listed below:
Above feels unnecessary and could potentially be causing the issue?