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.streaming.models.transcriber import DeepgramTranscriberConfig
from vocode.streaming.models.agent import LLMAgentConfig
from vocode.streaming.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.49.tar.gz
(13.9 kB
view details)
Built Distribution
vocode-0.1.49-py3-none-any.whl
(25.3 kB
view details)
File details
Details for the file vocode-0.1.49.tar.gz
.
File metadata
- Download URL: vocode-0.1.49.tar.gz
- Upload date:
- Size: 13.9 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 | d744b4cf6c683f76d695bdcc7564caf7c4eeaeae897dd16cd7d8a32df458b373 |
|
MD5 | 0fa4ce7aa48de73d367fab5e4445a28b |
|
BLAKE2b-256 | ba125991abff6dcbd199c274eb3f2a52be15fe51d0cc70b4f19a6c2250242547 |
File details
Details for the file vocode-0.1.49-py3-none-any.whl
.
File metadata
- Download URL: vocode-0.1.49-py3-none-any.whl
- Upload date:
- Size: 25.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 | ed66e49e01ffab90f03e0a80fbef13997116cd4c6fefba228bb96443cdc7c6a4 |
|
MD5 | 1c8bac6708bea79d78b863719d7f5914 |
|
BLAKE2b-256 | 399b2be9f7148511a66afa1f2a29577aaeb0d97a9a4c215bf6793365085c72d9 |