Skip to content

Commit 9b03de2

Browse files
authored
482 unify version across demos (vocodedev#489)
* Update vocode version in apps/client_backend/pyproject.toml last stable vocode Version * Update langchain_agent README and pyproject.toml to last stable vocode version * Update apps/telegram_bot Python version and Vocode dependency vocodedev#482 * Update apps/telephony_app dependencies and fix documentation links vocodedev#482 * Update vocode version in apps/voice_rag vocodedev#482
1 parent 4b2f03b commit 9b03de2

19 files changed

+5450
-5488
lines changed

apps/client_backend/poetry.lock

Lines changed: 1255 additions & 1163 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/client_backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
[tool.poetry.dependencies]
99
python = ">=3.9,<3.12"
1010
python-dotenv = "^1.0.0"
11-
vocode = "0.1.111a3"
11+
vocode = "0.1.111"
1212
elevenlabs = "^0.2.23"
1313

1414

apps/langchain_agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# langchain_agent
22

3-
See https://docs.vocode.dev/langchain-agent for setup steps!
3+
See https://docs.vocode.dev/open-source/langchain-agent for setup steps!

apps/langchain_agent/poetry.lock

Lines changed: 1361 additions & 1226 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/langchain_agent/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ redis = "^4.5.4"
1111
twilio = "^8.1.0"
1212
vonage = "^3.5.1"
1313
python-dotenv = "^1.0.0"
14-
vocode = "0.1.111a3"
14+
vocode = "0.1.111"
1515
google-cloud-texttospeech = "^2.14.1"
1616

1717

apps/telegram_bot/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11
1+
FROM python:3.9-bullseye
22

33
# get portaudio and ffmpeg
44
RUN apt-get update \

apps/telegram_bot/main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
BaseSynthesizer,
2929
)
3030

31+
from dotenv import load_dotenv
32+
33+
load_dotenv()
34+
3135
logging.basicConfig(
3236
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
3337
)
@@ -46,7 +50,7 @@
4650
# Required environment variables containing API key: OPENAI_API_KEY, TELEGRAM_BOT_KEY, and your Vocode synthesizers classes corresponding API key variable
4751

4852
# Your chosen synthesizer provider's corresponding Vocode turn_based class instance
49-
SYNTH = CoquiSynthesizer(use_xtts=True)
53+
SYNTH = AzureSynthesizer(voice_name="en-US-SteffanNeural")
5054

5155
# Instructions to the language model responsible for generating response transcript.
5256
SYSTEM_PROMPT = "You are having a voice-to-voice conversation with a user. Always pretend you are a real human. Do not avoid or decline to answer questions because you are not human."
@@ -153,7 +157,8 @@ async def get_response(
153157
setattr(self.synthesizer, voice_attr_of[type(self.synthesizer)], voice_id)
154158

155159
# Synthesize response
156-
synth_response = await self.synthesizer.async_synthesize(agent_response)
160+
# TODO make async
161+
synth_response = self.synthesizer.synthesize(agent_response)
157162

158163
# Save conversation to DB
159164
self.db[chat_id].current_conversation = pickle.dumps(agent.memory)

apps/telegram_bot/poetry.lock

Lines changed: 1464 additions & 1960 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/telegram_bot/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ authors = ["Your Name <[email protected]>"]
66
readme = "README.md"
77

88
[tool.poetry.dependencies]
9-
python = ">=3.11,<3.12"
9+
python = ">=3.9,<3.12"
1010
python-telegram-bot = "^20.3"
1111
mypy = "^1.3.0"
1212
black = "^23.3.0"
13-
vocode = {git = "https://github.com/vocodedev/vocode-python.git", rev = "zaptrem/turn-based-improvements", extras=["all"]}
13+
vocode = "0.1.111"
1414

1515

1616
[build-system]

apps/telephony_app/.env.template

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1+
# The base URL for the application. This is used in the main.py file.
2+
# If BASE_URL is not set, you need to set the NGROK_AUTH_TOKEN for creating a tunnel to the dev server.
3+
# example:
4+
# BASE_URL=telephony-app.ngrok.io
15
BASE_URL=
6+
# The authentication token for ngrok. This is used in the main.py file for creating a tunnel to the dev server.
7+
# This needs to be set if BASE_URL is not set.
8+
# NGROK_AUTH_TOKEN=
9+
10+
# The API key for Deepgram. This is used for speech recognition.
211
DEEPGRAM_API_KEY=
12+
13+
# The API key for OpenAI. This is used for natural language processing tasks.
314
OPENAI_API_KEY=
15+
16+
# The API key and region for Azure Speech Service, used for speech-to-text services.
417
AZURE_SPEECH_KEY=
518
AZURE_SPEECH_REGION=
19+
20+
# The account SID and authentication token for Twilio. These are used for making API requests to Twilio.
621
TWILIO_ACCOUNT_SID=
722
TWILIO_AUTH_TOKEN=

0 commit comments

Comments
 (0)