This commit is contained in:
Ajay Raj 2023-03-04 19:38:35 -08:00
commit 7fe47319f0
2 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "vocode" name = "vocode"
version = "0.1.15" version = "0.1.16"
description = "The all-in-one voice SDK" description = "The all-in-one voice SDK"
authors = ["Ajay Raj <ajay@vocode.dev>"] authors = ["Ajay Raj <ajay@vocode.dev>"]
license = "MIT License" license = "MIT License"

View file

@ -4,7 +4,7 @@ import signal
from vocode.conversation import Conversation from vocode.conversation import Conversation
from vocode.helpers import create_microphone_input_and_speaker_output from vocode.helpers import create_microphone_input_and_speaker_output
from vocode.models.transcriber import DeepgramTranscriberConfig from vocode.models.transcriber import DeepgramTranscriberConfig, PunctuationEndpointingConfig
from vocode.models.agent import ChatGPTAgentConfig, RESTfulUserImplementedAgentConfig, WebSocketUserImplementedAgentConfig, EchoAgentConfig, ChatGPTAlphaAgentConfig, ChatGPTAgentConfig from vocode.models.agent import ChatGPTAgentConfig, RESTfulUserImplementedAgentConfig, WebSocketUserImplementedAgentConfig, EchoAgentConfig, ChatGPTAlphaAgentConfig, ChatGPTAgentConfig
from vocode.models.synthesizer import AzureSynthesizerConfig from vocode.models.synthesizer import AzureSynthesizerConfig
from vocode.user_implemented_agent.restful_agent import RESTfulAgent from vocode.user_implemented_agent.restful_agent import RESTfulAgent
@ -19,8 +19,16 @@ if __name__ == "__main__":
conversation = Conversation( conversation = Conversation(
input_device=microphone_input, input_device=microphone_input,
output_device=speaker_output, output_device=speaker_output,
transcriber_config=DeepgramTranscriberConfig.from_input_device(microphone_input), transcriber_config=DeepgramTranscriberConfig.from_input_device(
agent_config=EchoAgentConfig(initial_message="Hello!"), microphone_input,
endpointing_config=PunctuationEndpointingConfig()
),
agent_config=WebSocketUserImplementedAgentConfig(
initial_message="Hello!",
respond=WebSocketUserImplementedAgentConfig.RouteConfig(
url="wss://1d7e6ab7b588.ngrok.io/respond",
)
),
synthesizer_config=AzureSynthesizerConfig.from_output_device(speaker_output) synthesizer_config=AzureSynthesizerConfig.from_output_device(speaker_output)
) )
signal.signal(signal.SIGINT, lambda _0, _1: conversation.deactivate()) signal.signal(signal.SIGINT, lambda _0, _1: conversation.deactivate())