u/Bandidoski14

Construí un asistente de voz portátil ESP32 con conversión de voz a texto real, respuestas de IA, emociones OLED y salida de audio PCM.

¡Hola a todos! Estoy trabajando en un pequeño proyecto DIY llamado Oracle OS, un asistente de voz portátil tipo escritorio, basado en un ESP32.

El objetivo es crear un asistente diminuto que parezca vivo: puede escuchar a través de un micrófono, enviar el audio a un servidor web, procesarlo con IA, responder mediante un altavoz y mostrar expresiones en una pequeña pantalla OLED.

La configuración actual utiliza:

  • ESP32-WROOM
  • Pantalla OLED I2C de 0,96 pulgadas
  • Módulo de micrófono MAX4466
  • Amplificador PAM8403
  • Altavoz pequeño de 4 ohmios
  • Botón pulsador para la función pulsar para hablar
  • WiFiManager para la configuración de Wi-Fi
  • Backend FastAPI alojado en el renderizador
  • AssemblyAI para la conversión de voz a texto
  • Modelo Groq/Llama para las respuestas de la IA
  • VoiceRSS para la conversión de texto a voz
  • Audio PCM de 8 bits transmitido de vuelta al ESP32
  • Salida DAC del ESP32 en GPIO25

La parte más difícil hasta ahora ha sido la salida de audio. Probé con MP3, WAV, SAM (voz local) y varias librerías de audio para ESP32, pero la mayoría producían un ruido similar al de un zumbador a través del PAM8403. La solución que finalmente funcionó fue convertir el audio TTS a PCM de 8 bits sin procesar y luego transmitirlo directamente al ESP32, donde lo reproduzco con dacWrite() a través del GPIO25. Actualmente, el asistente puede:

  • Grabar mi voz mientras mantengo presionado un botón
  • Enviar el audio al servidor
  • Transcribir el habla
  • Generar una respuesta breve con IA
  • Mostrar la respuesta en la pantalla OLED
  • Reproducir la respuesta a través del altavoz
  • Mostrar ojos y expresiones animadas
  • Mostrar un reloj/modo de escritorio
  • Abrir un menú sencillo en la pantalla OLED
  • Ejecutar minijuegos como Dino Jump y Reflex
  • Reiniciar el Wi-Fi mediante el botón al encender el dispositivo

Aún es un prototipo, pero finalmente funciona.

Me encantaría recibir comentarios de la comunidad sobre:

  • Mejores maneras de reducir el ruido de audio del DAC ESP32 al PAM8403
  • Mejores ideas de filtrado usando solo componentes básicos
  • Mejorar las animaciones y la "personalidad" de la pantalla OLED
  • Simplificar el sistema de menús con un solo botón
  • Hacer que el backend sea más rápido y ligero
  • Si debería migrar a ESP32-S3 con PSRAM más adelante
  • Mejores ideas para una carcasa compacta para el escritorio

Intento mantener el proyecto económico y construirlo principalmente con piezas que ya tengo. Cualquier consejo, crítica o idea para futuras actualizaciones sería de gran ayuda.

Seguiré actualizando el proyecto a medida que mejore el audio, las animaciones, la carcasa y las funciones.

¡Gracias!

reddit.com
u/Bandidoski14 — 2 days ago

I built a portable ESP32 voice assistant with real speech-to-text, AI replies, OLED emotions, and PCM audio output

Hi everyone! I’m working on a small DIY project called Oracle OS, a portable desk-buddy style voice assistant built around an ESP32.

The goal is to make a tiny assistant that feels alive: it can listen through a microphone, send the audio to a web backend, process it with AI, speak back through a speaker, and show expressions on a small OLED display.

The current setup uses:

  • ESP32-WROOM
  • 0.96 inch I2C OLED display
  • MAX4466 microphone module
  • PAM8403 amplifier
  • small 4 ohm speaker
  • push button for push-to-talk
  • WiFiManager for WiFi setup
  • Render-hosted FastAPI backend
  • AssemblyAI for speech-to-text
  • Groq / Llama model for AI replies
  • VoiceRSS for text-to-speech
  • PCM 8-bit audio streamed back to the ESP32
  • ESP32 DAC output on GPIO25

The hardest part so far was audio output. I tried MP3, WAV, SAM local speech, and several ESP32 audio libraries, but most of them produced buzzer-like noise through the PAM8403. The solution that finally worked was having the backend convert the TTS audio into raw 8-bit PCM and then streaming it directly to the ESP32, where I play it with dacWrite() through GPIO25.

Right now, the assistant can:

  • Record my voice while holding a button
  • Send the audio to the server
  • Transcribe speech
  • Generate a short AI answer
  • Display the answer on the OLED
  • Speak the answer through the speaker
  • Show animated eyes and expressions
  • Show a clock / desk buddy mode
  • Open a simple OLED menu
  • Run small games like Dino Jump and Reflex
  • Reset WiFi through the button at boot

It is still very much a prototype, but it finally works.

I’d love feedback from the community on:

  • Better ways to reduce audio noise from the ESP32 DAC into the PAM8403
  • Better filtering ideas using only basic components
  • Improving the OLED animations and “personality”
  • Making the menu system smoother with only one button
  • Making the backend faster and lighter
  • Whether I should move to ESP32-S3 with PSRAM later
  • Better enclosure ideas for a small desk companion

I’m trying to keep the project low-cost and build it mostly with parts I already have. Any advice, criticism, or ideas for future updates would help a lot.

I’ll keep updating the project as I improve the audio, animations, enclosure, and features.

Thanks!

reddit.com
u/Bandidoski14 — 3 days ago

Making a chatbot with a esp32 wroom-30.

Already has mic,speaker,oled display. It is really difficoult to run ia on a board without psram, please give me solutions to not saturate the board and work perfect.

:)

reddit.com
u/Bandidoski14 — 7 days ago