Prism is a voice-controlled generative AI art wall. It's designed to be projected or displayed on a screen in a home or office.
It's open source, and you can install it for yourself using the instructions below.
Prism.-.demo.1.mp4
Heads up! These instructions require a decent amount of technical know-how.
Most of the web services used are free, but you will need to pay for Stability AI to generate images, and you may incur a tiny billing amount (< $1 / mo) with Google Firebase.
-
Create a Firebase project. (Go to https://firebase.google.com/, sign up and create a new project. You can call it
Prism
or whatever you'd like). -
Add the following services to your project:
- Firestore Database (
Cloud Firestore
, notRealtime Database
) (optionally enable analytics) - Functions
- App Check
- Storage
-
In the new Firestore Database, create a new collection called
sites
, then choose a name for your "site" and add a document with that name as the id, and with one key/value:createdAt
= now. -
Configure App Check: Enforce it on
Storage
andCloud Firestore
. (It will also be enforced on Functions automatically later). -
Sign up for a Stability AI account at https://beta.dreamstudio.ai/ and get an API key on the Account page.
-
Add your Stability API Key to Google Cloud Secrets (Go to https://cloud.google.com/security/products/secret-manager and create a new secret with the name
STABILITY_API_KEY
in the Firebase project you just created). -
Optionally sign up for a Pico Voice account and get an
access key
(https://picovoice.ai/). -
Fork this repo and then install Prism locally (clone your new repo on your machine).
-
Put all of your Firebase info and other API keys in the appropriate places in
.env
. Leave the variables ending in_EMULATOR
as false. The next group are all Firebase related.VITE_PRISM_SITE_ID
is the name of the site you chose in step 3 above.VITE_PICO_VOICE_ACCESS_KEY
is the access key from Pico Voice.VITE_SECRET_URL_QUERY
is a simple password you should create (and use in step 15). -
Commit the changes in
.env
. -
Install the Firebase CLI tool (
npm install -g firebase-tools
). -
Run
npm run deploy-rules
to add the Firestore Database rules to your new project. -
Run
npm run deploy-functions
to deploy the Firebase Functions to yor new project. -
Deploy the front-end web interface on a service like Vercel. (On Vercel, create a new project and link it to your newly forked repo, and it should take care of everything else).
-
Go to your newly deployed site and add
?secret=[the-password-you-set-in-env]
and you should see it all working!
For local development, you'll need to follow all of the steps above (at least through 13). Here is additional info:
npm install
npm run dev
Add a .env.local
file in the root directory, and you can override any variables from .env
.
In order to use App Check locally, you will need to add a debug token. Follow the instructions in /src/db/firebase.js
.
You can also run Firebase emulators for any of the services. Start the emulators (npm run emulators
) and change the XXX_EMULATOR
variables to true
in .env.local
.
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).