Skip to content

I've built an interactive AI powered drawing assistant that reads user emotion (from text, audio or image), processes it with an ML/DL model and uses Python Turtle to draw expressive art or animations based on the predicted emotion. It also does exploratory data analysis (EDA) and visualizes emotion distribution with R.

Notifications You must be signed in to change notification settings

diya-18/DreamScribe

Repository files navigation

DreamScribe

DreamScribe is an interactive AI project that captures spoken dream input, analyzes emotions using NLP, calculates surrealism scores, and visualizes data through Python Turtle and R analytics.


Features

  • Speech-to-Text: Captures your voice using SpeechRecognition
  • Emotion Analysis: Extracts Happy, Sad, Angry, Fear, and Surprise scores via text2emotion
  • SER (Speech Emotion Recognition): Analyzes vocal tone using librosa
  • Generative Art: Visualizes your dream mood using Python Turtle
  • R Analytics: Generates professional emotion trends and surrealism histograms

Installation & Setup

1. Fork & Clone

  • Fork this repository to your own GitHub account
  • Open your terminal (Git Bash or PowerShell) and clone it:
git clone https://github.com/your-username/DreamScribe.git
cd DreamScribe

2. Python Environment (3.13 Compatible)

Create a virtual environment to keep your dependencies clean and avoid path conflicts:

Windows (PowerShell):

python -m venv .venv
.\.venv\Scripts\Activate.ps1

Windows (Git Bash):

python -m venv .venv
source .venv/Scripts/activate

3. Install Dependencies

Install all required libraries, including the specific fixes for Python 3.13 (legacy-cgi) and text2emotion (emoji==1.7.0):

pip install -r requirements.txt

4. Setup NLP Data

Run this one-liner to download the necessary NLTK datasets for emotion analysis:

python -c "import nltk; nltk.download('punkt'); nltk.download('wordnet')"

How to Run

Step 1: Record Your Dream

Run the main Python script. When prompted, speak clearly into your microphone for 7 seconds:

python main.py
  • The script will log your data to dream_diary.csv
  • Your dream art will be drawn with Turtle

Step 2: Analyze in R

Once you have logged dreams, run the R script to generate your trend charts.

Using Git Bash:

/c/Program\ Files/R/R-4.4.x/bin/Rscript.exe R_analysis.R

(Replace R-4.4.x with your actual version, e.g., R-4.4.2)

Using PowerShell:

& "C:\Program Files\R\R-4.4.x\bin\Rscript.exe" R_analysis.R

(Replace R-4.4.x with your actual version, e.g., R-4.4.2)

Step 3: View Results

Open the generated files in your project folder to see your data:

  • avg_emotion_plot.png - Bar chart of average emotions
  • surrealism_hist.png - Histogram of dream wildness
  • Rplots.pdf - Combined analysis report

Troubleshooting

Issue Solution
ModuleNotFoundError: 'cgi' This project uses legacy-cgi to remain compatible with Python 3.13
AttributeError: 'UNICODE_EMOJI' This is fixed by using emoji==1.7.0. Do not upgrade the emoji library
Rscript not recognized Ensure you are using the full path to your R installation as shown in the run steps above

About

I've built an interactive AI powered drawing assistant that reads user emotion (from text, audio or image), processes it with an ML/DL model and uses Python Turtle to draw expressive art or animations based on the predicted emotion. It also does exploratory data analysis (EDA) and visualizes emotion distribution with R.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors