Thicket data repository for the EEG
1{
2 "id": "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a",
3 "title": "Week 1",
4 "link": "https://dakpro.github.io/project_feeds/low_power_speech_recognition/week1",
5 "updated": "2025-07-18T14:39:00",
6 "published": "2025-08-10T19:12:43.309993",
7 "summary": "<h2>Whisper</h2>\n<p>Went through the paper on Whisper - speech recognition model from OpenAI.</p>\n<p>It's open source and available on GitHub.</p>\n<p>Many models are available to choose from:</p>\n<p><img alt=\"Models\" src=\"week1.1.png\">\nChoice of model:</p>\n<ol>\n<li>By taking into account other processes running on the device -- better for deployment</li>\n<li>Customizable by user?</li>\n</ol>\n\n<p><i>There can be some custom vocabulary/promting added to the model -- interesting what it can be achieved with it.</i></p>\n<p>Training dataset is 2/3 english and 1/3 uneven mix, but model's "knowledge" is transferable across the languages (for instance slavic languages parts enhance each other).</p>\n<p>Installed both whisper and whisper.cpp on Mac</p>\n<p>Ran transcription with whisper</p>\n<p>Ran transcription with whisper.cpp</p>\n<p><code>sox -d <filename></code>\nnice tool to record audio\n-d stands for default input device</p>\n<h2>rPi</h2>\n<p>Tried to set up the rPI. The system didn't boot. Turns out it's the problem with the rPi itself - it didn't read from the SD card (indication of no reading: no green LED blinking, only red).</p>\n<p>Got new board - gives green light</p>\n<h2>new rPi</h2>\n<p>Booting rPi with 64-bit standart (not headless) OS.\n<i>for production and further testing - headless (Lite) version should be tested as it's smaller and faster than the standart OS.</i></p>\n<h3>Connecting Mac to the rPi ssh via ethernet via switch</h3>\n<p>! don't forget about setting host when writing OS to the SD-card</p>\n<p><i>just figured out you can update bootloader with the same sd - just different stuff needs to be loaded on it. Could I fix the "broken" rPi by updating the boot? (to be done)</i></p>\n<ol>\n<li>connect both rPi and Mac to an ethernet switch (NetGear GS108 in my case)</li>\n\n<p><i>Had problem with detecting connection from rPi to the switch.</i></p>\n<li>When using ethernet on Mac, one should add the ethernet as service. (Done in *Settings/Network*)</li>\n\n<li>To make the connection work, one should make static IP addresses on the connection for both Mac and rPi</li>\n</ol>\n\n<p>For Mac:</p>\n<ol>\n<li>goto Settings/Network/Apple Adapter(or how else you named the service) -> Details -> TCP/IP tab</li>\n<li>change configure ipv4 to manual</li>\n<li>Input the static address (I chose 192.168.5.1)</li>\n<li>Subnet mask is left 255.255.0.0, other empty fields are left empty</li>\n</ol>\n\n<p>For standart rPi setup:</p>\n<ol>\n<li>Click on the double-arrow network symbol in the top right corner</li>\n<li>Advanced Options/Edit Connections/Wired Connection X/IPv4 Settings/</li>\n<i>note: previously set Link negotiation on Wired Connection X/Ethernet to Automatic - what has it fixed??</i>\n<i>also set cloned MAC address to Permanent - not sure I completely understand what it does</i>\n<li>Set *Method* to *Manual*</li>\n<li>*Add*</li>\n<li>Set parameters (192.168.5.2, 24, 192.168.5.1 for me (not sure what 24 does))</li>\n<li>Save</li>\n<li>Reboot the rPi</li>\n</ol>\n\n<p>For headless rPi setup:<strong>TODO</strong></p>\n<p>Finally, we got the working rPi-Mac connection</p>\n<p>To verify: turn off wifi and try\n<code>ping raspberrypi.local</code>\nOr even try to login (on my rPi I made user = "user"):\n<code>ssh <a href=\"mailto:user@raspberrypi.local\">user@raspberrypi.local</a></code>\nAlso ensure in .ssh/known_hosts there's no entry for raspberrypi.local, as there exists a with such URL, thus when you try to connect to ssh for the first time the website is accessed.</p>\n<h3>Connecting rPi to eduroam via wlan</h3>\n<p>needs to be done via loading configuration as /etc/wpa_supplicant/wpa_supplicant.conf:</p>\n<pre><code>\nnetwork={\n ssid=\"eduroam\"\n key_mgmt=WPA-EAP\n eap=PEAP\n identity=\"\"\n password=\"\"\n phase1=\"peaplabel=0\"\n phase2=\"auth=MSCHAPV2\"\n ca_cert=\"\"\n priority=1\n}\n</code></pre>\n\n<p>restarting the service:</p>\n<pre><code>\nsudo killall wpa_supplicant\nsudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf\nsudo dhclient wlan0\n</code></pre>\n\n<p>check by</p>\n<pre><code>\niwgetid\nping 1.1.1.1\n</code></pre>\n\n<h3>Ran whisper.cpp on rPi</h3>\n<p>Took ~18s to transcribe 11s audio.\nLite OS optimization wouldn't be that effective + other processes are to be run in the background.</p>\n<p>Before thinking on optimization decided to run kyutai, as if kyutai is 5 times faster, optimization efforts are wasted.</p>\n<h2>Kyutai</h2>\n<p>Alternative model: kyutai</p>\n<ul>\n<li>Smaller, better performance than whisper</li>\n<li>Inputs stream instead of recording, thus much better for live transcription</li>\n<li>Only English and French</li>\n</ul>\n<p>Trying to run kyutai model on rPi</p>\n<ol>\n<li>Clone repo from git</li>\n<li>Install rust</li>\n<li>cd stt-rs</li>\n<li>sudo apt install libssl-dev</li>\n<li>export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig</li>\n<li>cargo run -r ../audio/bria.mp3</li>\n</ol>\n<i>takes a long to build - haven't tried with <code>uv</code> though</i>\n\n<p><i>github guide also includes "--features cuda" in the last stage, but as there's no gpu on rPi, it's been removed</i></p>\n<p>Problem: kyutai is too big and thus cannot fit into 3.3 RAM -> the process gets killed</p>\n<p>sudo install python-msgpack</p>",
8 "content": "<h2>Whisper</h2>\n<p>Went through the paper on Whisper - speech recognition model from OpenAI.</p>\n<p>It's open source and available on GitHub.</p>\n<p>Many models are available to choose from:</p>\n<p><img alt=\"Models\" src=\"week1.1.png\">\nChoice of model:</p>\n<ol>\n<li>By taking into account other processes running on the device -- better for deployment</li>\n<li>Customizable by user?</li>\n</ol>\n\n<p><i>There can be some custom vocabulary/promting added to the model -- interesting what it can be achieved with it.</i></p>\n<p>Training dataset is 2/3 english and 1/3 uneven mix, but model's "knowledge" is transferable across the languages (for instance slavic languages parts enhance each other).</p>\n<p>Installed both whisper and whisper.cpp on Mac</p>\n<p>Ran transcription with whisper</p>\n<p>Ran transcription with whisper.cpp</p>\n<p><code>sox -d <filename></code>\nnice tool to record audio\n-d stands for default input device</p>\n<h2>rPi</h2>\n<p>Tried to set up the rPI. The system didn't boot. Turns out it's the problem with the rPi itself - it didn't read from the SD card (indication of no reading: no green LED blinking, only red).</p>\n<p>Got new board - gives green light</p>\n<h2>new rPi</h2>\n<p>Booting rPi with 64-bit standart (not headless) OS.\n<i>for production and further testing - headless (Lite) version should be tested as it's smaller and faster than the standart OS.</i></p>\n<h3>Connecting Mac to the rPi ssh via ethernet via switch</h3>\n<p>! don't forget about setting host when writing OS to the SD-card</p>\n<p><i>just figured out you can update bootloader with the same sd - just different stuff needs to be loaded on it. Could I fix the "broken" rPi by updating the boot? (to be done)</i></p>\n<ol>\n<li>connect both rPi and Mac to an ethernet switch (NetGear GS108 in my case)</li>\n\n<p><i>Had problem with detecting connection from rPi to the switch.</i></p>\n<li>When using ethernet on Mac, one should add the ethernet as service. (Done in *Settings/Network*)</li>\n\n<li>To make the connection work, one should make static IP addresses on the connection for both Mac and rPi</li>\n</ol>\n\n<p>For Mac:</p>\n<ol>\n<li>goto Settings/Network/Apple Adapter(or how else you named the service) -> Details -> TCP/IP tab</li>\n<li>change configure ipv4 to manual</li>\n<li>Input the static address (I chose 192.168.5.1)</li>\n<li>Subnet mask is left 255.255.0.0, other empty fields are left empty</li>\n</ol>\n\n<p>For standart rPi setup:</p>\n<ol>\n<li>Click on the double-arrow network symbol in the top right corner</li>\n<li>Advanced Options/Edit Connections/Wired Connection X/IPv4 Settings/</li>\n<i>note: previously set Link negotiation on Wired Connection X/Ethernet to Automatic - what has it fixed??</i>\n<i>also set cloned MAC address to Permanent - not sure I completely understand what it does</i>\n<li>Set *Method* to *Manual*</li>\n<li>*Add*</li>\n<li>Set parameters (192.168.5.2, 24, 192.168.5.1 for me (not sure what 24 does))</li>\n<li>Save</li>\n<li>Reboot the rPi</li>\n</ol>\n\n<p>For headless rPi setup:<strong>TODO</strong></p>\n<p>Finally, we got the working rPi-Mac connection</p>\n<p>To verify: turn off wifi and try\n<code>ping raspberrypi.local</code>\nOr even try to login (on my rPi I made user = "user"):\n<code>ssh <a href=\"mailto:user@raspberrypi.local\">user@raspberrypi.local</a></code>\nAlso ensure in .ssh/known_hosts there's no entry for raspberrypi.local, as there exists a with such URL, thus when you try to connect to ssh for the first time the website is accessed.</p>\n<h3>Connecting rPi to eduroam via wlan</h3>\n<p>needs to be done via loading configuration as /etc/wpa_supplicant/wpa_supplicant.conf:</p>\n<pre><code>\nnetwork={\n ssid=\"eduroam\"\n key_mgmt=WPA-EAP\n eap=PEAP\n identity=\"\"\n password=\"\"\n phase1=\"peaplabel=0\"\n phase2=\"auth=MSCHAPV2\"\n ca_cert=\"\"\n priority=1\n}\n</code></pre>\n\n<p>restarting the service:</p>\n<pre><code>\nsudo killall wpa_supplicant\nsudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf\nsudo dhclient wlan0\n</code></pre>\n\n<p>check by</p>\n<pre><code>\niwgetid\nping 1.1.1.1\n</code></pre>\n\n<h3>Ran whisper.cpp on rPi</h3>\n<p>Took ~18s to transcribe 11s audio.\nLite OS optimization wouldn't be that effective + other processes are to be run in the background.</p>\n<p>Before thinking on optimization decided to run kyutai, as if kyutai is 5 times faster, optimization efforts are wasted.</p>\n<h2>Kyutai</h2>\n<p>Alternative model: kyutai</p>\n<ul>\n<li>Smaller, better performance than whisper</li>\n<li>Inputs stream instead of recording, thus much better for live transcription</li>\n<li>Only English and French</li>\n</ul>\n<p>Trying to run kyutai model on rPi</p>\n<ol>\n<li>Clone repo from git</li>\n<li>Install rust</li>\n<li>cd stt-rs</li>\n<li>sudo apt install libssl-dev</li>\n<li>export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig</li>\n<li>cargo run -r ../audio/bria.mp3</li>\n</ol>\n<i>takes a long to build - haven't tried with <code>uv</code> though</i>\n\n<p><i>github guide also includes "--features cuda" in the last stage, but as there's no gpu on rPi, it's been removed</i></p>\n<p>Problem: kyutai is too big and thus cannot fit into 3.3 RAM -> the process gets killed</p>\n<p>sudo install python-msgpack</p>",
9 "content_type": "html",
10 "categories": [],
11 "source": "https://dakpro.github.io/project_feeds/low_power_speech_recognition/feed.xml"
12}