Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chainlit realtime-assistant not working in local : observing panics #148

Open
adhil-tinvio opened this issue Oct 8, 2024 · 5 comments
Open

Comments

@adhil-tinvio
Copy link

Was trying out chainlit realtime-assistant in local
could see these errors like below audio recording.
how can i fix this to test things out in local.

Log Trace:

  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
    result = coro.send(None)
             ^^^^^^^^^^^^^^^
  File "/Users/adhile/cookbook/realtime-assistant/realtime/__init__.py", line 109, in _receive_messages
    self.dispatch(f"server.{event['type']}", event)
  File "/Users/adhile/cookbook/realtime-assistant/realtime/__init__.py", line 66, in dispatch
    handler(event)
  File "/Users/adhile/cookbook/realtime-assistant/realtime/__init__.py", line 434, in _on_speech_stopped
    self._process_event(event, self.input_audio_buffer)
  File "/Users/adhile/cookbook/realtime-assistant/realtime/__init__.py", line 424, in _process_event
    item, delta = self.conversation.process_event(event, *args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/adhile/cookbook/realtime-assistant/realtime/__init__.py", line 176, in process_event
    return event_processor(self, event, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/adhile/cookbook/realtime-assistant/realtime/__init__.py", line 146, in <lambda>
    'input_audio_buffer.speech_stopped': lambda self, event, input_audio_buffer: self._process_speech_stopped(event, input_audio_buffer),
                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/adhile/cookbook/realtime-assistant/realtime/__init__.py", line 268, in _process_speech_stopped
    speech = self.queued_speech_items[item_id]
             ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'item_AG19J1QC1KjVkIBVgWiOL'```
@adhil-tinvio adhil-tinvio changed the title chainlit relatim-assistant not working in local observing panics chainlit realtime-assistant not working in local observing panics Oct 8, 2024
@adhil-tinvio adhil-tinvio changed the title chainlit realtime-assistant not working in local observing panics chainlit realtime-assistant not working in local : observing panics Oct 8, 2024
@willydouhard
Copy link
Contributor

is it happening randomly or are you able to reproduce?

@adhil-tinvio
Copy link
Author

@willydouhard
it is happening everytime.
i was trying to spawn this locally and see how it works to adap to our tool
i can record audio and when i complete recording it just stays same.
i can see these logs in my terminal

@adhil-tinvio
Copy link
Author

FYI,i am just cloning this repo and testing out in my local.
that should be working?

@willydouhard
Copy link
Contributor

@willydouhard it is happening everytime. i was trying to spawn this locally and see how it works to adap to our tool i can record audio and when i complete recording it just stays same. i can see these logs in my terminal

Are you running the cookbook as is or modified?

@willydouhard
Copy link
Contributor

FYI,i am just cloning this repo and testing out in my local. that should be working?

it should

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants