Skip to content

Instantly share code, notes, and snippets.

View akdeb's full-sized avatar
👾
realtime ai speech on esp32

Akashdeep Deb akdeb

👾
realtime ai speech on esp32
View GitHub Profile
@akdeb
akdeb / esp32_sine_wave_speaker.cpp
Created November 17, 2025 11:11
ESP32 sine wave generator
#include <Arduino.h>
#include "driver/i2s.h"
// Use your existing pin defs
#define I2S_LRC D0 // LRCLK / WS
#define I2S_BCLK D1 // BCLK
#define I2S_DOUT D2 // DIN to MAX98357A
#define I2S_SD_OUT D3 // SD / shutdown (mute) pin on MAX98357A
// Audio settings
@akdeb
akdeb / nextjs_openai_stream_client.tsx
Last active February 21, 2024 16:12
Streaming JSON objects returned by LLM Stream (OpenAI, Anthropic, Mistral etc.) in NextJS / React
"use client";
// generated this with copilot
const YourClient: React.FC<{}> = (props) => {
function processBuffer(
buffer: string,
onObjectParsed: (object: any) => void,
isFinal: boolean = false

Keybase proof

I hereby claim:

  • I am akdeb on github.
  • I am akad3b (https://keybase.io/akad3b) on keybase.
  • I have a public key ASBoBG3ZfwTNia9apbCTjgry2qw2lDDHpHHwRzvniPnzZgo

To claim this, I am signing this object: