update readme

This commit is contained in:
Ajay Raj 2023-02-27 21:52:41 -08:00
commit e11450dc61
2 changed files with 23 additions and 9 deletions

View file

@ -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())
```

View file

@ -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 <ajay@vocode.dev>"]
license = "MIT License"