This Python script receives messages from the Empatica E4 streaming server and forwards them to OSC.
It uses open-e4-client and Python OSC to communicate with both the E4 and OSC.
- Install Python 3.10 or higher (I suggest using miniconda).
- Install dependencies:
pip install numpy open-e4-client python-osc
Connect to an E4 Streaming Server, read all events, record them in an event log and forwards them over OSC:
python e4-osc-bridge.py --record event.log --osc_ip 192.168.1.5 --osc_port 9999
The osc_ip is optional and will default to 127.0.0.1
(localhost).
Read events from a recorded log file and forward them over OSC, using the correct timing:
python e4-osc-bridge.py --replay event.log --osc_ip 192.168.1.5 --osc_port 9999
The E4 also has its own format to save a session as a folder containing .csv
files. Use the convert-e4-recording.py
script to turn it into a log file we can use to replay:
python convert-e4-recording.py your-e4-session-directory your-output.log
Then replay it:
python e4-osc-bridge.py --replay your-output.log --osc_port 8000
To see a list of arguments, run:
python e4-osc-bridge.py --help