<commit_before>This repository is a collection of code to create visualisation.

Check [demo-render](https://github.com/TristanCacqueray/demo-render) for the result.

# Setup

To run the code, you need to:

```bash
$ python3 -mvenv ~/demo-code-venv
$ . ~/demo-code-venv/bin/activate
(venv) $ pip3 install hy2glsl pyyaml scipy soundfile sounddevice image pyopengl pyopencl Cython scipy pygame numpy hy
# Glumpy needs to be install separately
(venv) $ pip3 install glumpy
```

Check audio input from alsa:

```bash
$ ./explorer_audio_mod.py --help
$ ./explorer_audio_mod.py --list-sound-devices
   0 HDA Intel PCH: ALC285 Analog (hw:0,0), ALSA (2 in, 2 out)
   1 Sennheiser USB headset: Audio (hw:1,0), ALSA (1 in, 2 out)<commit_msg>Add missing glfw and tkinter requirements<commit_after>This repository is a collection of code to create visualisation.

Check [demo-render](https://github.com/TristanCacqueray/demo-render) for the result.

# Setup

To run the code, you need to:

```bash
$ python3 -mvenv ~/demo-code-venv
$ . ~/demo-code-venv/bin/activate
(venv) $ pip3 install hy2glsl pyyaml scipy soundfile sounddevice image pyopengl pyopencl Cython scipy pygame numpy hy
# Glumpy needs to be install separately
(venv) $ pip3 install glumpy
# Ensure glfw-dev package is installed
(venv) $ pkg-config --libs glfw3
[Print -lglfw]
# Ensure tkinter binding is working
(venv) $ python3 -m "tkinter"
[Show a tk window]
```

Check audio input from alsa:

```bash
$ ./explorer_audio_mod.py --help
$ ./explorer_audio_mod.py --list-sound-devices
   0 HDA Intel PCH: ALC285 Analog (hw:0,0), ALSA (2 in, 2 out)
   1 Sennheiser USB headset: Audio (hw:1,0), ALSA (1 in, 2 out)
{'fraction_non_alphanumeric': 0.11191335740072202, 'fraction_numerical': 0.021660649819494584, 'mean_word_length': 4.229559748427673, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3122140', 'n_tokens_mistral': 614, 'n_tokens_neox': 592, 'n_words': 202}