Willow Documentation

repository·main·Indexed 25 days ago

https://github.com/heywillow/willow

A platform for high-speed language inference tasks supporting STT, TTS, and LLMs. Includes guides for self-hosting the Willow Inference Server, testing audio with intray, resolving ESP32 crashes using addr2line, and generating NVS partitions.

Tokens
650
Snippets
3
Records
5
Agent score
35%

What's inside Willow

  1. Generate an NVS partition

    main

    To generate an NVS (Non-Volatile Storage) partition, create a nvs.csv file defining your keys, types, encodings, and values. Then, use the nvs_partition_gen.py script to generate the .bin file.

    Example nvs.csv format:

    key,type,encoding,value
    WIFI,namespace,,
    PSK,data,string,mypassword
    SSID,data,string,myssid
    /opt/esp/idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate --version 2 nvs.csv nvs.bin 0x24000
  2. Test audio without API using intray

    main

    You can test audio data without using the API by using intray.

    1. Run intray pointing to a directory:
      ./intray-x86_64-unknown-linux-musl --dir /tmp
    2. Set the CONFIG_SERVER_URI environment variable to point to your raw audio upload endpoint (e.g., http://192.168.0.10:8080/upload/full/willow.raw).
    3. If the file already exists, intray will append a suffix. You can play these files using ffplay with the following parameters (note that options depend on your ESP firmware configuration):
      ffplay -f s16le -ac 1 -ar 16000 willow.raw
    ffplay -f s16le -ac 1 -ar 16000 willow.raw
  3. Resolve crashes using addr2line

    main

    When encountering a Guru Meditation Error or similar crash on ESP32 hardware, use addr2line to map the addresses in the backtrace to specific lines in your source code.

    Pass the path to your .elf file and the address pairs (PC:A0) from the backtrace to the xtensa-esp32s3-elf-addr2line tool.

    $ /opt/esp/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-addr2line -e build/willow.elf 0x42043afc:0x3fcaf490 0x42042b4a:0x3fcaf4b0 0x420245f6:0x3fcaf4d0 0x42024637:0x3fcaf840 0x420105ea:0x3fcaf860 0x42008b20:0x3fcaf890 0x4211bd17:0x3fcafac0