Last Updated 1 week by cneuhaus

Objective: Build  simple, affordable &  robust ChatGPT BOX supporting real-time communication.

Requirements:

  • Use standard components only: ESPS3, ICS43434 I2S Microphone, MAX 98357A amplifier
  • Communicate with openAI-Realtime API
  • Listen for a wake-up word (locally- not cloud connection)
  • Allows real communication (voice activity detection allows to interrupt the chat)
  • Follow the standard:
    • ESP-IDF environment
    • ESP-ADF (Audio Framework)
    • ESP-SR (Speech Recognition)
  • Development Environment: CLION + ESP-IDF Plugin

Notes:

  • esp-adf can be downloaded together with esp-idf from github: https://github.com/espressif/esp-adf
  • Two ways to kick-of build process:  CLION Build and ESP-IDF Plugin, both can co -exist – and require env-variable ESP_IDF and ESP_ADF setup
    • ESP-IDF Plugin allows quick start of MENUCONFIG (doesnt work from CLION) and simple compile and monitor
    • CLION-Make allows direct jump from error-messages to source code
  • CLION Build Config
    • CMAKE Config: Setup environment variables
    • Toolchain Config: Configure running of export.sh (this is the export.sh from the ESP_IDF folder)
  • ESP-IDF Config: Normally runs out-of-the-box but didnt work with ESP-ADF framework downloaded until I inserted ADF_PATH in  CMakeLists.txt in /home/development/.esp-adf/esp-adf:
    set(ENV{ADF_PATH} "/home/development/.esp-adf/esp-adf/")
    execute_process(COMMAND git describe --always --tags --dirty
                    OUTPUT_VARIABLE ADF_VER
                    OUTPUT_STRIP_TRAILING_WHITESPACE
                    WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
    add_definitions(-DADF_VER=\"${ADF_VER}\")
    
    if(NOT DEFINED ENV{IDF_PATH})
    set(ENV{IDF_PATH} "$ENV{ADF_PATH}/esp-idf/")
    endif()
    set(EXTRA_COMPONENT_DIRS ${EXTRA_COMPONENT_DIRS} $ENV{ADF_PATH}/components)

 

 

 

 

Categories: Uncategorized