diff --git a/OS/01/.env.example b/OS/01/.env.example new file mode 100644 index 0000000..fa11853 --- /dev/null +++ b/OS/01/.env.example @@ -0,0 +1,26 @@ +### SETTINGS +# Copy this file and rename it to ".env" to use it. + +# If ALL_LOCAL is False, we'll use OpenAI's services +# If setting ALL_LOCAL to true, set the path to the WHISPER local model +ALL_LOCAL=False +# WHISPER_MODEL_PATH=... +# OPENAI_API_KEY=sk-... + +# If SERVER_START, this is where we'll serve the server. +# If DEVICE_START, this is where the device expects the server to be. +SERVER_URL=ws://localhost:8000/ +SERVER_START=True +DEVICE_START=True + +# Control where various operations happen— can be `device` or `server`. +CODE_RUNNER=server +TTS_RUNNER=server # If device, audio will be sent over websocket. +STT_RUNNER=device # If server, audio will be sent over websocket. + +# Will expose the server publically and display that URL. +SERVER_EXPOSE_PUBLICALLY=False + +# Debug level +# DEBUG_LEVEL=DEBUG +DEBUG_LEVEL="INFO" \ No newline at end of file diff --git a/OS/01/start.sh b/OS/01/start.sh index db5689a..5e2c4fd 100755 --- a/OS/01/start.sh +++ b/OS/01/start.sh @@ -1,28 +1,9 @@ -### SETTINGS - -# If ALL_LOCAL is False, we'll use OpenAI's services -# If setting ALL_LOCAL to true, set the path to the WHISPER local model -export ALL_LOCAL=False -# export WHISPER_MODEL_PATH=... -# export OPENAI_API_KEY=sk-... - -# If SERVER_START, this is where we'll serve the server. -# If DEVICE_START, this is where the device expects the server to be. -export SERVER_URL=ws://localhost:8000/ -export SERVER_START=True -export DEVICE_START=True - -# Control where various operations happen— can be `device` or `server`. -export CODE_RUNNER=server -export TTS_RUNNER=server # If device, audio will be sent over websocket. -export STT_RUNNER=device # If server, audio will be sent over websocket. - -# Will expose the server publically and display that URL. -export SERVER_EXPOSE_PUBLICALLY=False - -# Debug level -# export DEBUG_LEVEL=DEBUG -export DEBUG_LEVEL="INFO" +### Import config from .env +if [ ! -f ".env" ]; then + echo "Error: .env file does not exist. To create one, see .env.example for an example." + exit 1 +fi +set -a; source .env; set +a ### SETUP diff --git a/README.md b/README.md index 24057cf..743f4b8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ Official repository for [The 01 Project](https://twitter.com/hellokillian/status
-## Setup +## Configuration: + +Copy the OS/01/.env.example file to OS/01/.env and then configure the environment variables within the file. + +## Install Required Libraries: ```bash # MacOS