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

Uploaded Source

Built Distribution

vocode-0.1.11-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vocode-0.1.11.tar.gz
  • Upload date:
  • Size: 7.7 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.11.tar.gz
Algorithm Hash digest
SHA256 3ad5cc5dcbe3447d51e120aa559773c5080f8c4c4dbf37e44582d833903db4bc
MD5 6de93d53effaeeb33e36cb9a7dcd394d
BLAKE2b-256 911f64a544f6dbd0b4933c457bf0df63a7e4885bfccf335269bee10a44247405

See more details on using hashes here.

File details

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

File metadata

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

Hashes for vocode-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ca9a69852157580dd91dc2916d3d71fd66b931dd297858457612fb551725eb66
MD5 6cddd7ec456a02204613e38f96a0fba0
BLAKE2b-256 46f6238d95bda352ac20b2efdd43f4d5340e751d6ff78e981e2184838ae8d0c5

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