Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 5fab872
Author: Neil Dwyer <[email protected]>
Date:   Tue Feb 6 17:18:48 2024 -0800

    Kitt to handle empty deepgram text + elevenlabs bug fix (livekit#155)

    hotfix

commit 7661824
Author: Neil Dwyer <[email protected]>
Date:   Tue Feb 6 16:25:35 2024 -0800

    Bump deepgram version (livekit#154)

commit ddc168e
Author: Neil Dwyer <[email protected]>
Date:   Tue Feb 6 16:10:52 2024 -0800

    Fixes to Elevenlabs (livekit#152)

commit 5555526
Author: David Zhao <[email protected]>
Date:   Tue Feb 6 09:12:38 2024 -0800

    Update KITT and other plugins to use end_of_speech field (livekit#153)

    * Update KITT and other plugins to use end_of_speech field

    Tested with KITT. It significantly improves the end of speech behavior so that
    we are giving it a 1s wait before starting to process user input.

    * ruff on 3.10

    * use ruff action

    * fixed ruff

commit a98a7c1
Author: Paul Lockett <[email protected]>
Date:   Tue Feb 6 00:02:51 2024 -0800

    update tts init to export StreamAdapter (livekit#149)

commit 604d7e3
Author: Sean Muirhead <[email protected]>
Date:   Mon Feb 5 21:35:55 2024 -0800

    Update deepgram endpointing  (livekit#145)

    * deepgram: Add min_silence_duration to deepgram client.

    deepgram controls vad by endpointing parameter, this fix allows to configure min_silence_duration in agents layer

    * add utterance_end_ms and speech_final to Deepgram plugin

    * add utterance_end_ms and speech_final to Deepgram plugin

    * expose speech_final as end_of_speech

    ---------

    Co-authored-by: Lam Nguyen <[email protected]>
  • Loading branch information
askable-nic committed Feb 22, 2024
1 parent 2e3ec7f commit 17209f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/kitt/kitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async def intro_text_stream():

AgentState = Enum("AgentState", "IDLE, LISTENING, THINKING, SPEAKING")

STT_SILENCE_BUFFER = 50
STT_SILENCE_BUFFER = 1000

ELEVEN_TTS_SAMPLE_RATE = 24000
ELEVEN_TTS_CHANNELS = 1
Expand Down Expand Up @@ -243,6 +243,8 @@ async def process_stt_stream(self, stream):

if not event.end_of_speech:
continue
if event.is_final:
buffered_text = " ".join([buffered_text, event.alternatives[0].text])

self.unsent_messages.append(buffered_text)

Expand Down Expand Up @@ -273,6 +275,7 @@ def post_unsent_messages(self):
msg = ChatGPTMessage(role=ChatGPTMessageRole.user, content=text)
chatgpt_stream = self.chatgpt_plugin.add_message(msg)
self.ctx.create_task(self.process_chatgpt_result(chatgpt_stream))
buffered_text = ""

async def process_chatgpt_result(self, text_stream):
print("🧠 Processing ChatGPT result", text_stream)
Expand Down

0 comments on commit 17209f3

Please sign in to comment.