From 10dd15447ac72a6d8dc4ca26387465be3220848c Mon Sep 17 00:00:00 2001 From: Okan Deniz Ozkan <134109389+odenizo@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:14:47 -0700 Subject: [PATCH 1/2] Add script to deploy and configure voice feature in GCP VM --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/OpenInterpreter/01?shareId=XXXX-XXXX-XXXX-XXXX). --- deploy_voice_feature.sh | 31 +++++++++++++++++++++++++++++++ docs/server/configure.mdx | 16 ++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 deploy_voice_feature.sh diff --git a/deploy_voice_feature.sh b/deploy_voice_feature.sh new file mode 100644 index 00000000..35bea664 --- /dev/null +++ b/deploy_voice_feature.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Update and install necessary dependencies +sudo apt-get update +sudo apt-get install -y python3-pip python3-venv ffmpeg + +# Create a virtual environment +python3 -m venv venv +source venv/bin/activate + +# Install required Python packages +pip install poetry + +# Clone the repository if not already cloned +if [ ! -d "01" ]; then + git clone https://github.com/OpenInterpreter/01.git +fi + +cd 01/software + +# Install project dependencies +poetry install + +# Set up environment variables for the voice feature +echo "export OPENAI_API_KEY='your_openai_api_key'" >> ~/.bashrc +echo "export ELEVENLABS_API_KEY='your_elevenlabs_api_key'" >> ~/.bashrc +echo "export DEEPGRAM_API_KEY='your_deepgram_api_key'" >> ~/.bashrc +source ~/.bashrc + +# Start the server with the voice feature enabled +poetry run 01 --server light --expose --qr diff --git a/docs/server/configure.mdx b/docs/server/configure.mdx index e40efd6b..46748662 100644 --- a/docs/server/configure.mdx +++ b/docs/server/configure.mdx @@ -141,3 +141,19 @@ interpreter.tts = "coqui" introducing all-local functionality for the Livekit server as soon as possible. + +### Deploy and Configure Voice Feature in GCP VM + +To deploy and configure the voice feature in a GCP VM where Open Interpreter is already installed, you can use the provided `deploy_voice_feature.sh` script. This script automates the entire process, including installing necessary dependencies, setting up environment variables, and starting the server with the voice feature enabled. + +1. Download the `deploy_voice_feature.sh` script to your GCP VM. +2. Make the script executable: + ```bash + chmod +x deploy_voice_feature.sh + ``` +3. Run the script: + ```bash + ./deploy_voice_feature.sh + ``` + +The script will handle the installation of dependencies, configuration of environment variables, and starting the server with the voice feature enabled using the OpenAI Realtime Voice API. From c9e5c238a296a4debd8ced9968b88c66e4094535 Mon Sep 17 00:00:00 2001 From: Okan Deniz Ozkan <134109389+odenizo@users.noreply.github.com> Date: Mon, 28 Oct 2024 19:16:42 -0700 Subject: [PATCH 2/2] --- deploy_voice_feature.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/deploy_voice_feature.sh b/deploy_voice_feature.sh index 35bea664..557d7996 100644 --- a/deploy_voice_feature.sh +++ b/deploy_voice_feature.sh @@ -23,8 +23,6 @@ poetry install # Set up environment variables for the voice feature echo "export OPENAI_API_KEY='your_openai_api_key'" >> ~/.bashrc -echo "export ELEVENLABS_API_KEY='your_elevenlabs_api_key'" >> ~/.bashrc -echo "export DEEPGRAM_API_KEY='your_deepgram_api_key'" >> ~/.bashrc source ~/.bashrc # Start the server with the voice feature enabled