This PR adds support for keyword-based interrupts in the vocode-python library. Currently, the bot gets interrupted whenever the human starts speaking. With this PR, a new configuration parameter wake_up_word is introduced in the AgentConfig class. This parameter allows the user to specify a wake-up word that should trigger an interruption.
Summary of Changes
Added a new configuration parameter wake_up_word in the AgentConfig class in vocode/streaming/agent/base_agent.py. This parameter is optional and has a default value of None.
Modified the interruption logic in the TranscriptionsWorker class in vocode/streaming/streaming_conversation.py. The bot now only gets interrupted when the wake-up word is detected in the human's speech. This change is implemented by adding a new condition to check if the transcribed speech contains the wake-up word before triggering an interruption. The wake_up_word configuration parameter is used in this condition.
Please review and merge this PR. Thank you!
Fixes #3.
To checkout this PR branch, run the following command in your terminal:
Description
This PR adds support for keyword-based interrupts in the
vocode-python
library. Currently, the bot gets interrupted whenever the human starts speaking. With this PR, a new configuration parameterwake_up_word
is introduced in theAgentConfig
class. This parameter allows the user to specify a wake-up word that should trigger an interruption.Summary of Changes
wake_up_word
in theAgentConfig
class invocode/streaming/agent/base_agent.py
. This parameter is optional and has a default value of None.TranscriptionsWorker
class invocode/streaming/streaming_conversation.py
. The bot now only gets interrupted when the wake-up word is detected in the human's speech. This change is implemented by adding a new condition to check if the transcribed speech contains the wake-up word before triggering an interruption. Thewake_up_word
configuration parameter is used in this condition.Please review and merge this PR. Thank you!
Fixes #3.
To checkout this PR branch, run the following command in your terminal: