diff --git a/README.md b/README.md index ee84307..b6c5665 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,25 @@ -# vocode-python-sdk +# vocode Python SDK -```bash -# set up environment -python3 -m venv venv -source venv/bin/activate -pip install -r requirements.txt +```python +import asyncio +import signal -# start talking to an AI -python simple_conversation.py +from vocode.conversation import Conversation +from vocode.helpers import create_microphone_input_and_speaker_output +from vocode.models.transcriber import DeepgramTranscriberConfig +from vocode.models.agent import LLMAgentConfig +from vocode.models.synthesizer import AzureSynthesizerConfig + +if __name__ == "__main__": + microphone_input, speaker_output = create_microphone_input_and_speaker_output(use_first_available_device=True) + + conversation = Conversation( + input_device=microphone_input, + output_device=speaker_output, + transcriber_config=DeepgramTranscriberConfig.from_input_device(microphone_input), + agent_config=LLMAgentConfig(prompt_preamble="The AI is having a pleasant conversation about life."), + synthesizer_config=AzureSynthesizerConfig.from_output_device(speaker_output) + ) + signal.signal(signal.SIGINT, lambda _0, _1: conversation.deactivate()) + asyncio.run(conversation.start()) ``` diff --git a/pyproject.toml b/pyproject.toml index d688708..0d6fd1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "vocode" -version = "0.1.7" +version = "0.1.8" description = "The all-in-one voice SDK" authors = ["Ajay Raj "] license = "MIT License"