The all-in-one voice SDK
Project description
vocode Python SDK
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.8.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file vocode-0.1.8.tar.gz
.
File metadata
- Download URL: vocode-0.1.8.tar.gz
- Upload date:
- Size: 6.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 | 4aeac0bdf5d8cd564fe877d26ca2ef6ffd5188aeef3cd7dc04c6a4e02245c305 |
|
MD5 | 21888af82af0e54e64b2293452c3b1e9 |
|
BLAKE2b-256 | 1bb87268e820acecd1bd18cdeab279e6f6135a1e55e4306d417ff6b7c9b66c34 |
File details
Details for the file vocode-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: vocode-0.1.8-py3-none-any.whl
- Upload date:
- Size: 9.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 | f1892994c86baaaaa7186490590aa2f510cc039ae9fb97ff782fd9a2014dbeb7 |
|
MD5 | 78ddf107b8a1bdc0049354d0e671dcf7 |
|
BLAKE2b-256 | 89e2ccbda569c5ef86cd73f5469a5c5e3393d84acb231607a0b0d0a502654607 |