From e0382f329b79feeb359a42e0a423836431219691 Mon Sep 17 00:00:00 2001 From: Ajay Raj Date: Fri, 24 Feb 2023 10:52:09 -0800 Subject: [PATCH] rename token to key --- simple_conversation.py | 2 +- vocode/conversation.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/simple_conversation.py b/simple_conversation.py index 4c10bc6..3bab478 100644 --- a/simple_conversation.py +++ b/simple_conversation.py @@ -16,7 +16,7 @@ if __name__ == "__main__": microphone_input, speaker_output = create_microphone_input_and_speaker_output(use_first_available_device=True) conversation = Conversation( - token=os.environ.get("VOCODE_API_KEY"), + key=os.environ.get("VOCODE_API_KEY"), input_device=microphone_input, output_device=speaker_output, transcriber_config=DeepgramTranscriberConfig.from_input_device(microphone_input), diff --git a/vocode/conversation.py b/vocode/conversation.py index 1eeb75d..0e5cc60 100644 --- a/vocode/conversation.py +++ b/vocode/conversation.py @@ -20,14 +20,14 @@ class Conversation: def __init__( self, - token: str, + key: str, input_device: BaseInputDevice, output_device: BaseOutputDevice, transcriber_config: TranscriberConfig, agent_config: AgentConfig, synthesizer_config: SynthesizerConfig ): - self.token = token + self.key = key self.input_device = input_device self.output_device = output_device self.transcriber_config = transcriber_config @@ -46,7 +46,7 @@ class Conversation: self.active = False async def start(self): - async with websockets.connect(f"{VOCODE_WEBSOCKET_URL}?key={self.token}") as ws: + async with websockets.connect(f"{VOCODE_WEBSOCKET_URL}?key={self.key}") as ws: async def sender(ws): start_message = StartMessage( transcriber_config=self.transcriber_config,