Skip to content

blairjordan/blair-room-3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3ae59af Β· Dec 6, 2024

History

25 Commits
Oct 25, 2024
Feb 6, 2024
Dec 6, 2024
Feb 5, 2024
Feb 6, 2024

Repository files navigation

My Office

My Office is a 3D room that allows you to interview a virtual avatar.

Featuring:

  • 🧍 An avatar that can be interviewed using chat input (powered by OpenAI)
  • πŸ”Š Avatar speech output (powered by Google Text-to-Speech API)
  • 🎹 An interactive piano and guitar that can be played using your mouse.
  • πŸ–₯️ Multiple monitors displaying short videos.

The application is built using Three.js, React Fiber, and Node.js.

Screenshot

πŸš€ Getting Started

The application is split into two parts: the server and the client.

🌐 Server

The server facilitates chatting with our virtual avatar, using socket.io for real-time communication, OpenAI API for intelligent responses, and Google Cloud Platform for speech conversion.

Setup

  1. Google Cloud Platform: Secure a service account key file. Place it in the server directory as service-account.json and declare GOOGLE_APPLICATION_CREDENTIALS=./service-account.json as an environment variable.

  2. OpenAI API Key: Sign up for an OpenAI API Key. Store your key in an environment variable named OPENAI_API_KEY.

  3. Assistant ID: Create an OpenAI Assistant and set its ID as OPENAI_ASSISTANT_ID environment variable.

  4. Chat Sender: Identify your chat sender with SENDER_FROM environment variable.

cd server
npm install
npm start # or npm run dev for development mode

πŸ’» Client

The client enables the user to interact with a virtual avatar through typed chat inputs. Additionally, the user can interact with various objects within the virtual room.

Setup

  1. Set the environment variable NEXT_PUBLIC_SERVER_URL to the server URL.

  2. Install the client dependencies and start the client.

cd client
npm install
npm start # or npm run dev for development mode

About

πŸ’» My office - in 3D

Resources

Stars

Watchers

Forks

Languages