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.28.tar.gz
(8.8 kB
view details)
Built Distribution
vocode-0.1.28-py3-none-any.whl
(13.3 kB
view details)
File details
Details for the file vocode-0.1.28.tar.gz
.
File metadata
- Download URL: vocode-0.1.28.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 | 3a0351de2184cec6be7ef1de23bb463bdb131c137481d05af194842ba0a0ec46 |
|
MD5 | 0f37cf2cfed8dad1e74c94fa855ea823 |
|
BLAKE2b-256 | 585c9834482831f0570ccde77514ff1dcf1f657535c046b31cdf7120d6c56163 |
File details
Details for the file vocode-0.1.28-py3-none-any.whl
.
File metadata
- Download URL: vocode-0.1.28-py3-none-any.whl
- Upload date:
- Size: 13.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 | f54f7ae0c5d7262a7a657e241a865f73173cf988dc539a671901efc9d3355100 |
|
MD5 | 725839eb7761b1bbd76e0071f99888ad |
|
BLAKE2b-256 | 6ecf982a779cc8c72db60b093b581e61079aaec84f3998d3ad408a284d09b9c2 |