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.36.tar.gz
(10.1 kB
view details)
Built Distribution
vocode-0.1.36-py3-none-any.whl
(15.3 kB
view details)
File details
Details for the file vocode-0.1.36.tar.gz
.
File metadata
- Download URL: vocode-0.1.36.tar.gz
- Upload date:
- Size: 10.1 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 | 3810bdaa6798d9a74ca558826fc6ea1f22f7f5546ff43014452c14d522af57e1 |
|
MD5 | a5b2fc0b7feb436231dfdf0cb20a0847 |
|
BLAKE2b-256 | c517dbf2a742eeb1cf4939f13c0d3266937a901c8b4a3168607eb0ea2103a4c7 |
File details
Details for the file vocode-0.1.36-py3-none-any.whl
.
File metadata
- Download URL: vocode-0.1.36-py3-none-any.whl
- Upload date:
- Size: 15.3 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 | f5a28e4434aa1e5bb5bd3c07b7209883dfefadc022aa8f5c15e16689318add79 |
|
MD5 | 2d6d47f5731c81ff79f53f638927084b |
|
BLAKE2b-256 | a5a65ec7169b92135c93d776440e481df1809b3c93d4d3b71b95b59e0e685680 |