diff --git a/client/setup.sh b/client/setup.sh index 22e96bd..5f94a95 100644 --- a/client/setup.sh +++ b/client/setup.sh @@ -77,7 +77,7 @@ apt upgrade -y # Install the necessary packages echo "Installing dependencies..." -apt install -y nodejs portaudio19-dev libportaudio2 libpulse-dev pulseaudio apulse git ffmpeg git +apt install -y nodejs portaudio19-dev libportaudio2 libpulse-dev pulseaudio apulse git ffmpeg git python3 echo "Setting up Pulse Audio" @@ -111,6 +111,11 @@ systemctl stop PulseAudio.service echo "Installing npm dependencies..." npm install +# Getting the Python DAB +echo "Installing PDAB and Dependencies" +git clone -b DRBv3 https://git.vpn.cusano.net/logan/Python-Discord-Audio-Bot.git ./discordAudioBot/pdab +pip3 install -r ./discordAudioBot/pdab/requirements.txt + # Generate .env file echo "Creating the config .env file..." echo "# Client Config" > .env @@ -138,6 +143,11 @@ echo "OP25_FULL_PATH=$op25_full_path" >> .env echo "" >> .env echo "# Core config, DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING" >> .env echo "CONFIG_PATH=./config/radioPresets.json" >> .env +python3 ./discordAudioBot/pdab/getDevices.py +audio_device_id=$(prompt_user "Enter the ID of the 'input' audio device you would like to use (most often 'default')") +echo "AUDIO_DEVICE_ID=$audio_device_id" >> .env +echo "PDAB_PORT=3110" >> .env +echo "NODE_ENV=production" >> .env echo ".env file generated successfully."