rename token to key
This commit is contained in:
parent
f7bec305f5
commit
e0382f329b
2 changed files with 4 additions and 4 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue