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

Uploaded Source

Built Distribution

vocode-0.1.22-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vocode-0.1.22.tar.gz
  • Upload date:
  • Size: 8.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.22.tar.gz
Algorithm Hash digest
SHA256 eb20abf98d60fbcf36e55cfa7b73938ae3081f44ec916ac2da38fe317e45e878
MD5 141d855b58c02283ed1eb6a1f3ff1fb6
BLAKE2b-256 21053430cfc69ca932c515696eec1aaff53ec05d28624a198685391d74031187

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vocode-0.1.22-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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.22-py3-none-any.whl
Algorithm Hash digest
SHA256 63859e48121c2016f572074bab053f98a478127c02e44f9fe80b5c2f99701b30
MD5 647e2e7d5a85a881fa585dbe8c37e97f
BLAKE2b-256 a3ff1aa2c9a02b6bf268feb05d08e731ee74e368d9b07674a5f00e8e39106998

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