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.50.tar.gz
(14.2 kB
view details)
Built Distribution
vocode-0.1.50-py3-none-any.whl
(25.9 kB
view details)
File details
Details for the file vocode-0.1.50.tar.gz
.
File metadata
- Download URL: vocode-0.1.50.tar.gz
- Upload date:
- Size: 14.2 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 | 5a87ff42b9142658230ed2d3f4ab0026e20ca49c8350b02ad73be013183e9045 |
|
MD5 | adc36fe923dcda81a042293441f9813d |
|
BLAKE2b-256 | 48fe10afc3d25410f09b99716002b1ed85a67119c3b4d2792ec793ecf7a16584 |
File details
Details for the file vocode-0.1.50-py3-none-any.whl
.
File metadata
- Download URL: vocode-0.1.50-py3-none-any.whl
- Upload date:
- Size: 25.9 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 | 4a0ca6b533f90bb030651e7a5463871c5e7d7035137b8241ce257d16097b28e4 |
|
MD5 | a851b6a1d6da1654b2f3614a9144bbb0 |
|
BLAKE2b-256 | 52afa760cc8b21f862f617d77b18b565b6451c292e761f51a49ab174ef4f8941 |