Skip to main content

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.45.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

vocode-0.1.45-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file vocode-0.1.45.tar.gz.

File metadata

  • Download URL: vocode-0.1.45.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Darwin/21.6.0

File hashes

Hashes for vocode-0.1.45.tar.gz
Algorithm Hash digest
SHA256 ebdc7cfa151c6eb0ad369102216ddf3a3dd988143c715981d54b470b2fae5d98
MD5 016fcc16ed07036cfd22d0c13425fa2c
BLAKE2b-256 cac9c54cd9f292976fb86dc15f6822213a422ebde2ce35c675cea055c417b91c

See more details on using hashes here.

File details

Details for the file vocode-0.1.45-py3-none-any.whl.

File metadata

  • Download URL: vocode-0.1.45-py3-none-any.whl
  • Upload date:
  • Size: 17.0 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

Hashes for vocode-0.1.45-py3-none-any.whl
Algorithm Hash digest
SHA256 3e1a54d3c494ceb5cda496ba731e112f4ff59566e9bb6cf64ccde8046b30fad0
MD5 45de60b711a21bca16e2f2b9c4c42777
BLAKE2b-256 18e76bb18d2e659fb534d00abf103ce7b9bab459e6de6f04db88883d9b2bfbd4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page