Re:Show HN: Open-source real-time talk-to-AI wearable device...
by stavros on Sunday October 06, 2024 @06:26PM
(#41760879)
This is good, thanks! Now that I see this, I realize that I'd want wakeword detection as well, which is getting a bit far. I like what the Willow team did with their stack, unfortunately that project seems to have died. It was pretty ideal, otherwise...
``` /* * @file streams-i2s-webserver_wav.ino * * This sketch reads sound data from I2S. The result is provided as WAV stream which can be listened to in a Web Browser * * @author Phil Schatzmann * @copyright GPLv3 /
#include <WiFi.h> #include "AudioTools.h"
const char ssid = "<stavros_ssid>"; const char *password = "stavros_pw"; AudioWAVServer server(ssid, password);
I2SStream i2sStream; ConverterFillLeftAndRight<int16_t> filler(LeftIsEmpty); // fill both channels - or change to RightIsEmpty
void setup() { Serial.begin(115200); AudioLogger::instance().begin(Serial, AudioLogger::Info);
}// Arduino loop void loop() { // Handle new connections server.copy(); }
```
This code just listens to audio you record on a microphone (INMP441 MEMS microphone used here) and streams it to an endpoint of the microcontroller's IP address. If you would like more help on this give me a shout anytime. my email: akash at starmoon dot app