update readme
This commit is contained in:
parent
ba66bdd7cd
commit
e11450dc61
2 changed files with 23 additions and 9 deletions
30
README.md
30
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())
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue