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
|
```python
|
||||||
# set up environment
|
import asyncio
|
||||||
python3 -m venv venv
|
import signal
|
||||||
source venv/bin/activate
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
# start talking to an AI
|
from vocode.conversation import Conversation
|
||||||
python simple_conversation.py
|
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())
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "vocode"
|
name = "vocode"
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue