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.40.tar.gz
(10.8 kB
view details)
Built Distribution
vocode-0.1.40-py3-none-any.whl
(16.5 kB
view details)
File details
Details for the file vocode-0.1.40.tar.gz
.
File metadata
- Download URL: vocode-0.1.40.tar.gz
- Upload date:
- Size: 10.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 | 32ca622afdc7fae3ec6c06740eed8874c2bd6d2d3c9b04e756890c5ded3785a1 |
|
MD5 | 94fc4d4ce2b8d4fb79ac480663b2c09e |
|
BLAKE2b-256 | 9cfb2fdafc680b4d6a2d14cd132328bb41b23ee55c757384b1904fbb135dce85 |
File details
Details for the file vocode-0.1.40-py3-none-any.whl
.
File metadata
- Download URL: vocode-0.1.40-py3-none-any.whl
- Upload date:
- Size: 16.5 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 | 02f437f1d485ea2f70e84f9a6e9006dc1385df97d2822397e03cb0a22e6e0735 |
|
MD5 | 46e2e8be95a418c378b45450d571e9c6 |
|
BLAKE2b-256 | 2178613e8c9c87cec107f5283950348a6db3e3cb4fcaa081e37dfc95ba6f698c |