This is an archived repository. The new Noora code can be found here.
Use AI to improve your social conversation.
A platform utilizing conversational AI to improve the social conversation of individuals with Autism Spectrum Disorder (ASD).
Noora is is a research project led by Prof. Monica Lam, from Stanford University, with the goal of improving the social conversation of people with Autism Spectrum Disorder (ASD). The project is a collaboration between Stanford's Open Virtual Assistant Lab and Dr. Lynn Koegel from Stanford's Dept. of Psychiatry and Behavioral Sciences.
This project built with Next.js, Tailwind CSS, OpenAI's GPT-3, and Microsoft Azure.
To run Noora locally for development, install the dependencies from your package manager and start the Next.js app.
yarn install
yarn run dev
Create a .env.local
file for the following environment variables.
For the speech-to-text and text-to-speech functionality, create an Azure speech resource (and a corresponding resource group).
OPENAI_API_KEY=[your API key]
SPEECH_KEY=[your API key]
SPEECH_REGION=[your API key]
pages
: all of the Next.js app's paths (e.g., noora.tsx
, _404.tsx
). These files simply return components, typically wrapped by the <Page>
component.
components
: the bulk of the website code. Folders under this directory reference the pages of the website, with the exception of components/global
and components/interfaces
.
components/interfaces
contains the code behind the Noora Chat feature and the Ask Noora feature.
data
: all static or pre-written data, such as GPT-3 prompts, statement banks, routes.
scripts
: code that is called by components.
/scripts/noora-chat
(and, more specifically,get-reply.ts
) contains the logic and flow for Noora's replies, and is used inMessageBox.tsx
(where users submit their message in the Noora Chat).
pages/api
: the REST API endpoints. Rate limiting is in place for endpoints (implementation found in scripts/rate-limit.ts
).
api/openai
calls OpenAI's Completion endpoint and returns the resultingtext
andlogprobs
.api/get-speech-token.ts
retrieves an ephemeral authentication token for Microsoft Azure's speech service.
public
: the public assets including images and static files.