Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MissingNO123/VRChat_AI_Assistant

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VRChat AI Assistant

OpenAI GPT-4 powered AI Assistant with a GUI that integrates with VRChat using OSC. This program is currently in an "it works on my machine" state, and will most likely not work on yours without a ton of tinkering. For example, it relies on VB-Audio VoiceMeeter Banana to play audio over the microphone. Either way, I'm uploading this just to have it up here.

Usage

Run either start_assistant.ps1 or .bat, which will automatically activate the virtual environment and start the program. If you for whatever reason are not using a virtual environment, just run python assistant.py.

The program will start listening when it detects either the parameters ChatGPT or ChatGPT_PB get triggered on your avatar. For example, you could trigger it either from the Action Menu, or using a Contact Sender/Receiver pair. Alternatively, double-tap the Right Control key to invoke it manually. Voice gets transcribed to text with Faster Whisper, which is forwarded to OpenAI, and the response is read out with Google Cloud TTS or optionally one of 11.ai voice synthesis, Google Translate, or Windows Default TTS. The response text is also fed into the VRChat Chatbox.

System commands are triggerable by saying "System" and the name of the command, which will also bypass sending it to OpenAI.

Installation

Copy .env.example to .env, get your API keys from OpenAI and from ElevenLabs, and put them in the file. Get your Google Cloud Authentication file and put it in the project directory, then add the path to it in .env.

Activate a virtual environment in the .\venv folder using python -m venv venv. This can be skipped, but is recommended to not conflict with globally installed packages. Install CUDA Toolkit and cuDNN and add their respective \bin folders to your PATH if you plan to use the GPU. Install the required Python packages listed below using pip. With GPU support, you may need to install the latest nightly version of PyTorch, or uninstall and re-install if you have an old version that doesn't work and/or wasn't compiled with CUDA support. An example command for installing PyTorch nightly on Windows using pip with CUDA 11.8 support is as follows:

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118

Requirements

Python 3.8 or higher with Pip. Highly recommended to use a venv.

To install all requirements:

pip install -U -r .\requirements.txt

Some features require an NVidia GPU, such as faster whisper. The program has not been tested with AMD, but I doubt it will work. In that case, edit the file where applicable to use CPU instead of CUDA. To use Faster Whisper, you need both cuDNN and CUDA Toolkit 11.8 in PATH. Otherwise, use OpenAI Whisper or use CPU inference.

The following files need to be copied over from C:\Windows\Media as I can't upload them to Github due to them being owned by Microsoft:

  • Speech Misrecognition.wav
  • Speech Off.wav
  • Speech On.wav
  • Speech Sleep.wav

Copyright

Copyright (c) 2023 MissingNO123. All rights reserved.

The contents of this repository, including all code, documentation, and other materials, unless otherwise specified, are the exclusive property of MissingNO123 and are protected by copyright law. Unauthorized reproduction, distribution, or disclosure of the contents of this repository, in whole or in part, without the express written permission of MissingNO123 is strictly prohibited.

The original version of the Software was authored on the 17th of March, 2023.

About

App to let you interface with a GPT that integrates with VRChat, and can be used from your desktop

Topics

Resources

License

Stars

Watchers

Forks

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.