Skip to content

hcicsebuffalo/nao_dev_LLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1e0a375 · Oct 23, 2023

History

6 Commits
Oct 14, 2023
Oct 14, 2023
Oct 18, 2023
Oct 18, 2023
Oct 18, 2023
Oct 23, 2023
Oct 17, 2023
Oct 14, 2023
Oct 18, 2023
Oct 14, 2023
Oct 14, 2023
Oct 14, 2023
Oct 14, 2023
Oct 23, 2023
Oct 14, 2023

Repository files navigation

HRI (Repository of our Nao & Pepper robot research project)

Demo videos

How to execute the code

  • Go to the folder chatgpt, execute the file hri_main.py.
  • That should work otherwise, please activate the conda environment hri first and then execute this file.

My setup

  • I am using windows 11 (WSL - Ubuntu 18)
  • For gpu setup please install, nvidia cuda toolkit on windows
  • Your distro will be able to access the gpu drivers
  • You need to install USBIPD on windows
  • Follow the steps from this website :
  • The audio drivers might not be present by default, need to install PulseAudio

Installation

To install this project, follow these steps:

Install PulseAudio, pavucontrol is for GUI

sudo apt update
sudo apt install pulseaudio -y
sudo apt install pavucontrol -y

Create Conda env

conda create --name hri
conda activate hri

Install PyTorch GPU

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

Install record audio libraries

conda install -c anaconda pyaudio

Install Voice Authentication module

pip install pyannote.audio

Install OpenAI for chatGPT integration

conda install -c conda-forge openai

Install Pyglet

conda install -c conda-forge pyglet

Install Whisper voice trascription model

pip install -U openai-whisper
pip install git+https://github.com/openai/whisper.git 
pip install --upgrade --no-deps --force-reinstall git+https://github.com/openai/whisper.git
sudo apt update && sudo apt install ffmpeg

This code needs API keys from OPENAI(for chatGPT) and huggingface.co(for pyannote)

export OPENAI_API_KEY="you-key-please"
export PYANNOTE_API_KEY="you-key-please"

You may need to create an ssh setup for GitHub

ssh-keygen -t rsa -b 4096 -C "email@domain.com"
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
git config --global user.email "email@domain.com"
git config --global user.name "Jon Doe"