Hackster will be offline on Monday, June 15 from 5pm to 7pm PDT to perform some scheduled maintenance.

Vermi: Interspecies Home Viewing

Non-human agents will negotiate and decide if your are a good fit for the space, not the other way around.

15
Vermi: Interspecies Home Viewing

Things used in this project

Hardware components

Barduino 4.0.2
×1
USB Cable, USB Type C Plug
USB Cable, USB Type C Plug
×1
Alligator Clips
Alligator Clips
×1
Speaker: 0.25W, 8 ohms
Speaker: 0.25W, 8 ohms
×1

Software apps and online services

Camo App
Touch Designer
Arduino IDE
Arduino IDE
HTML based web app

Hand tools and fabrication machines

Smartphones
Notebooks

Story

Read more

Custom parts and enclosures

AI real estate agent pre-scripted voice notes

AI real estate agent pre-scripted voice notes

AI real estate agent pre-scripted voice notes

Schematics

High Level System Map

Touchdesigner Node Network

CCL Label

Code

code for python and touchdesigner based voice transcripting and evaluation

Markdown
# VERMI TouchDesigner  Open Source Python Templates

This document contains cleaned and simplified Python templates for the VERMI evaluation workflow inside TouchDesigner.

---

# 1. CHOP Execute DAT Template (`chopexec1`)

Attach to:

```text
/project1/button1
```

Parameters:

```text
Active = ON
Off to On = ON
Value Change = OFF
While On = OFF
While Off = OFF
```

## Full `chopexec1` Script

```python
import os
import io
import json
import time
import uuid
import threading
import urllib.request
import urllib.error

OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")

RECORDER_PATH  = "/project1/audiofileout1"
RECORDINGS_DIR = os.path.join(
    os.path.expanduser("~"),
    "Desktop",
    "recordings"
)

TRANSCRIPT_DAT = "/project1/transcript_output"
EMOTION_DAT    = "/project1/emotion_output"
EVALUATION_DAT = "/project1/evaluation_output"

BUTTON_PATH    = "/project1/button1"
COMP4_PATH     = "/project1/comp4"

WHISPER_MODEL  = "gpt-4o-mini-transcribe"
GPT_MODEL      = "gpt-4o-mini"
LANGUAGE       = "en"


def _rec():
    return op(RECORDER_PATH)


def _set_label(label):
    btn = op(BUTTON_PATH)
    if btn:
        btn.par.label = label


def _set_dat(path, text):
    dat = op(path)
    if dat:
        dat.text = text


def _set_comp4_visible(visible):

    comp4 = op(COMP4_PATH)

    if not comp4:
        return

    try:
        comp4.par.display = 1 if visible else 0
    except:
        pass

    try:
        comp4.par.panel = 1 if visible else 0
    except:
        pass


def _is_recording():

    node = _rec()

    return bool(node.par.record.val) if node else False


def _multipart_body(fields, files, boundary):

    body = io.BytesIO()
    enc = boundary.encode("utf-8")

    for name, value in fields.items():

        body.write(b"--" + enc + b"\r\n")

        body.write(
            (
                'Content-Disposition: form-data; '
                'name="%s"\r\n\r\n'
                % name
            ).encode("utf-8")
        )

        body.write(str(value).encode("utf-8"))
        body.write(b"\r\n")

    for name, file_info in files.items():

        filename, ctype, data = file_info

        body.write(b"--" + enc + b"\r\n")

        body.write(
            (
                'Content-Disposition: form-data; '
                'name="%s"; filename="%s"\r\n'
                % (name, filename)
            ).encode("utf-8")
        )

        body.write(
            ('Content-Type: %s\r\n\r\n' % ctype).encode("utf-8")
        )

        body.write(data)
        body.write(b"\r\n")

    body.write(b"--" + enc + b"--\r\n")

    return body.getvalue()


def toggle_recording():

    if _is_recording():
        _stop_recording()
    else:
        _start_recording()


def onOffToOn(channel, sampleIndex, val, prev):

    toggle_recording()

    return
```

---

# 2. DAT Execute Template (`execute1`)

Create a DAT Execute DAT named:

```text
execute1
```

Set parameters:

```text
DAT = /project1/evaluation_output
Active = ON
Text Change = ON
```

Everything else OFF.

## Full `execute1` Script

```python
import json


def onTextChange(dat):

    try:

        raw = dat.text.strip()

        if not raw:
            return

        data = json.loads(raw)

        op('/project1/modal_score').par.text = (
            str(data.get('evaluation_score_0_to_100', 0))
            + ' / 100'
        )

        op('/project1/modal_verdict').par.text = (
            data.get('verdict', 'pending').upper()
        )

        op('/project1/modal_condition').par.text = (
            data.get('condition', '')
        )

        op('/project1/modal_reason').par.text = (
            data.get('brief_reason', '')
        )

        debug("MODAL UPDATED")

    except Exception as e:

        debug("EXECUTE1 ERROR: " + str(e))

    return


def onTableChange(dat):
    return
```

---

# 3. Recommended TouchDesigner Structure

```text
button1
   
chopexec1
```

```text
audiofileout1
```

```text
evaluation_output
   
execute1
```

```text
comp4
```

---

# 4. Runtime Flow

```text
button press

recording starts

comp4 hidden

recording stops

OpenAI transcription

OpenAI evaluation

evaluation_output updated

execute1 updates modal

comp4 visible
```

---

# 5. License Recommendation

Recommended for open-source release:

```text
MIT License
```

Good for:
- artistic installations
- TouchDesigner tooling
- research prototypes
- experimental interfaces

code for capacitive touch

Arduino
// ESP32 Capacitive Touch Basic Test
// Using internal Touch Sensor

const int touchPin = 6;    // The pin connected to foil/wire
const int threshold = 20;  // Adjust this based on Serial Monitor readings

void setup() {
  Serial.begin(115200);
  delay(1000); // Give time to open Serial Monitor
  Serial.println("ESP32 Touch Test Started");
}

void loop() {
  // readTouchValue returns a lower number when touched
  // (Your body acts as a capacitor and drains the charge)
  int touchValue = touchRead(touchPin);

  Serial.println(touchValue);

  delay(100); // Small delay to make the Serial Monitor readable
}

Credits

Madlen Elise von Wulffen
3 projects • 1 follower
Armin Gulbert
3 projects • 1 follower
Lauren Willihnganz
3 projects • 1 follower

Comments