The all-in-one voice SDK
Project description
vocode Python SDK
pip install vocode
import asyncio
import signal
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vocode-0.1.26.tar.gz
(8.8 kB
view details)
Built Distribution
vocode-0.1.26-py3-none-any.whl
(13.2 kB
view details)
File details
Details for the file vocode-0.1.26.tar.gz
.
File metadata
- Download URL: vocode-0.1.26.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48d5d52f800fdb2d86f4277d088a26d3065964aed4838b6c2370dad86bbfcb4e |
|
MD5 | 25c9f24e4ceb655c408b5ee7674f6fda |
|
BLAKE2b-256 | 91e78843ae1b8246b696da4884ec0c77f3b48d5333fba2f7ffb36d4beb7b1951 |
File details
Details for the file vocode-0.1.26-py3-none-any.whl
.
File metadata
- Download URL: vocode-0.1.26-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d3ded8491e36e9b063f66de8506e151abd60417f38dab357bce1f3ff2fa4a5b |
|
MD5 | 9cefe2fe769db0d9b6d20397a49ecb32 |
|
BLAKE2b-256 | fba43ef447f8e60f25ae9f6e772b2af100a4c4454b9da13467c7c0071ab2d10b |