Skip to content

Commit

Permalink
0.1.112 prerelease (vocodedev#557)
Browse files Browse the repository at this point in the history
* bump for prerelease

* bumps to 0.1.112
  • Loading branch information
ajar98 authored Jun 14, 2024
1 parent 78f7b8f commit c4a47dc
Show file tree
Hide file tree
Showing 11 changed files with 1,219 additions and 1,498 deletions.
2 changes: 1 addition & 1 deletion apps/client_backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-bullseye
FROM python:3.11-bullseye

# get portaudio and ffmpeg
RUN apt-get update \
Expand Down
29 changes: 2 additions & 27 deletions apps/client_backend/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
# client_backend

## Docker

1. Set up the configuration for your agent in `main.py`.
2. Set up an .env file using the template

```
cp .env.template .env
```

Fill in your API keys into .env

3. Build the Docker image

```bash
docker build -t vocode-client-backend .
```

4. Run the image and forward the port.

```bash
docker run --env-file=.env -p 3000:3000 -t vocode-client-backend
```

Now you have a client backend hosted at localhost:3000 to pass into the Vocode React SDK. You'll likely need to tunnel port 3000 to ngrok / host your server in order to use it in the React SDK.

## Non-docker setup

`main.py` just sets up a FastAPI server, so you can just run it with uvicorn:

```
uvicorn main:app
```

Note: building this with Docker is currently broken in 0.1.112 - we're planning an overhaul here, stay tuned!
1,245 changes: 541 additions & 704 deletions apps/client_backend/poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions apps/client_backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ authors = ["Your Name <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
python = ">=3.11,<3.12"
python-dotenv = "^1.0.1"
vocode = { path = "../..", extras = [
vocode = { version = "0.1.112", extras = [
"all",
], develop = true, python = ">=3.11,<3.12" }
] }
elevenlabs = "^1.2.2"


Expand Down
2 changes: 1 addition & 1 deletion apps/telephony_app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-bullseye
FROM python:3.10-bullseye

# get portaudio and ffmpeg
RUN apt-get update \
Expand Down
1,259 changes: 574 additions & 685 deletions apps/telephony_app/poetry.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions apps/telephony_app/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ authors = ["Your Name <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.9,<3.12"
python = ">=3.10,<3.12"
pyngrok = "^7.1.6"
python-dotenv = "^1.0.1"
vocode = { path = "../..", extras = [
azure-cognitiveservices-speech = "^1.38.0"
vocode = { version = "0.1.112", extras = [
"all",
], develop = true, python = ">=3.11,<3.12" }
]}


[build-system]
Expand Down
16 changes: 9 additions & 7 deletions docs/open-source/react-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,24 @@ AZURE_SPEECH_KEY=
AZURE_SPEECH_REGION=
```

### Running with Python

```
pip3 install vocode
uvicorn main:app --port 3000
```

### Running with Docker

Note: this is currently broken in 0.1.112 - we're planning an overhaul here, stay tuned!

From the `client_backend` directory:

```
docker build -t vocode-client-backend .
docker run --env-file=.env -p 3000:3000 -t vocode-client-backend
```

### Running with Python

```
pip3 install vocode
uvicorn main:app --port 3000
```

You now have a server with a Vocode websocket route at localhost:3000! You can now use the `useConversation` hook with your self-hosted backend as follows:

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs/open-source/telephony.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Pick one of these two ways to run the server: 1. Run everything with Docker, 2.

### Option 1: Run everything With Docker

Note: Support for the Azure synthesizer is currently broken in the current base Docker Python image.

1. Build the telephony app Docker image. From the `telephony_app` directory, run:

```bash
Expand Down
147 changes: 81 additions & 66 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vocode"
version = "0.1.112a0"
version = "0.1.112"
description = "The all-in-one voice SDK"
authors = ["Ajay Raj <[email protected]>"]
license = "MIT License"
Expand Down

0 comments on commit c4a47dc

Please sign in to comment.