VOOZH about

URL: https://pypi.org/project/vocode/

โ‡ฑ vocode ยท PyPI


Skip to main content

vocode 0.1.113

pip install vocode

Latest release

Released:

The all-in-one voice SDK

Navigation

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for ajayraj from gravatar.com
ajayraj

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License (MIT)
  • Author: Ajay Raj
  • Requires: Python <4.0, >=3.10

Project description

๐Ÿ‘ Image
  vocode

Build voice-based LLM apps in minutes

Vocode is an open source library that makes it easy to build voice-based LLM apps. Using Vocode, you can build real-time streaming conversations with LLMs and deploy them to phone calls, Zoom meetings, and more. You can also build personal assistants or apps like voice-based chess. Vocode provides easy abstractions and integrations so that everything you need is in a single library.

We're actively looking for community maintainers, so please reach out if interested!

โญ๏ธ Features

Check out our React SDK here!

๐Ÿซ‚ Contribution and Roadmap

We're an open source project and are extremely open to contributors adding new features, integrations, and documentation! Please don't hesitate to reach out and get started building with us.

For more information on contributing, see our Contribution Guide.

And check out our Roadmap.

We'd love to talk to you on Discord about new ideas and contributing!

๐Ÿš€ Quickstart

pipinstallvocode
import asyncio
import signal

from pydantic_settings import BaseSettings, SettingsConfigDict

from vocode.helpers import create_streaming_microphone_input_and_speaker_output
from vocode.logging import configure_pretty_logging
from vocode.streaming.agent.chat_gpt_agent import ChatGPTAgent
from vocode.streaming.models.agent import ChatGPTAgentConfig
from vocode.streaming.models.message import BaseMessage
from vocode.streaming.models.synthesizer import AzureSynthesizerConfig
from vocode.streaming.models.transcriber import (
 DeepgramTranscriberConfig,
 PunctuationEndpointingConfig,
)
from vocode.streaming.streaming_conversation import StreamingConversation
from vocode.streaming.synthesizer.azure_synthesizer import AzureSynthesizer
from vocode.streaming.transcriber.deepgram_transcriber import DeepgramTranscriber

configure_pretty_logging()


class Settings(BaseSettings):
"""
 Settings for the streaming conversation quickstart.
 These parameters can be configured with environment variables.
 """

 openai_api_key: str = "ENTER_YOUR_OPENAI_API_KEY_HERE"
 azure_speech_key: str = "ENTER_YOUR_AZURE_KEY_HERE"
 deepgram_api_key: str = "ENTER_YOUR_DEEPGRAM_API_KEY_HERE"

 azure_speech_region: str = "eastus"

 # This means a .env file can be used to overload these settings
 # ex: "OPENAI_API_KEY=my_key" will set openai_api_key over the default above
 model_config = SettingsConfigDict(
 env_file=".env",
 env_file_encoding="utf-8",
 extra="ignore",
 )


settings = Settings()


async def main():
 (
 microphone_input,
 speaker_output,
 ) = create_streaming_microphone_input_and_speaker_output(
 use_default_devices=False,
 )

 conversation = StreamingConversation(
 output_device=speaker_output,
 transcriber=DeepgramTranscriber(
 DeepgramTranscriberConfig.from_input_device(
 microphone_input,
 endpointing_config=PunctuationEndpointingConfig(),
 api_key=settings.deepgram_api_key,
 ),
 ),
 agent=ChatGPTAgent(
 ChatGPTAgentConfig(
 openai_api_key=settings.openai_api_key,
 initial_message=BaseMessage(text="What up"),
 prompt_preamble="""The AI is having a pleasant conversation about life""",
 )
 ),
 synthesizer=AzureSynthesizer(
 AzureSynthesizerConfig.from_output_device(speaker_output),
 azure_speech_key=settings.azure_speech_key,
 azure_speech_region=settings.azure_speech_region,
 ),
 )
 await conversation.start()
 print("Conversation started, press Ctrl+C to end")
 signal.signal(signal.SIGINT, lambda _0, _1: asyncio.create_task(conversation.terminate()))
 while conversation.is_active():
 chunk = await microphone_input.get_audio()
 conversation.receive_audio(chunk)


if __name__ == "__main__":
 asyncio.run(main())

๐Ÿ“ž Phone call quickstarts

๐ŸŒฑ Documentation

docs.vocode.dev

Project details

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for ajayraj from gravatar.com
ajayraj

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: MIT License (MIT)
  • Author: Ajay Raj
  • Requires: Python <4.0, >=3.10

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.113.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

Filter files by name, interpreter, ABI, and platform.

If you're not sure about the file name format, learn more about wheel file names.

Copy a direct link to the current filters

vocode-0.1.113-py3-none-any.whl (4.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vocode-0.1.113.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Darwin/23.5.0

File hashes

Hashes for vocode-0.1.113.tar.gz
Algorithm Hash digest
SHA256 3e7cb142cea58764bd17d411b973eda9082642a70e56cce5b36a5a9021165451
MD5 06c30b3dd77bdf01b6905a6d21b7e9e8
BLAKE2b-256 e5697f3c0ebec41160f6b31ecbb46f20537cc8443a1147e26da206a50a715d38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vocode-0.1.113-py3-none-any.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Darwin/23.5.0

File hashes

Hashes for vocode-0.1.113-py3-none-any.whl
Algorithm Hash digest
SHA256 7e99a12c74ba09654489d3743e0512bbdc378961f42c143d2705ca4a323a5784
MD5 c5b300b773a1092e7818db0b842da7d1
BLAKE2b-256 a3f772009a3a07144d2fb329c710c6c93aea6e27c0ad94caffb78bdd6b8dcb33

See more details on using hashes here.

Supported by

๐Ÿ‘ Image
AWS Cloud computing and Security Sponsor ๐Ÿ‘ Image
Datadog Monitoring ๐Ÿ‘ Image
Depot Continuous Integration ๐Ÿ‘ Image
Fastly CDN ๐Ÿ‘ Image
Google Download Analytics ๐Ÿ‘ Image
Pingdom Monitoring ๐Ÿ‘ Image
Sentry Error logging ๐Ÿ‘ Image
StatusPage Status page