ESP32-audioI2S icon indicating copy to clipboard operation
ESP32-audioI2S copied to clipboard

Version # in json header not updated -> Arduino IDE shows 'wrong' version in Library manager

Open kaloprojects opened this issue 6 months ago • 3 comments

Hi @schreibfaul1 , found a tiny issue which makes some confusion in Arduino IDE library manager for many user. One of my Voice assistant user have found this detail (it was never a issue for me because i don't use the library manager to install zips, always update my folders manually, easier ;), but many folks using. So thanks to @chhorisberger, he found this issue!

Here the issue / screenshot to Arduino IDE library manager:

Image

Image

So in my examples you see 3.0.13 installed (or older 2.0.0), both are wrong! .. currently installed is your latest 3.2.0i (not 3.0.13) .. and i never had a older 2.0.0 (just an 3.0.12f for testing)..

Root cause: .. just seen that your file library.json are often not updated (inside the zips), which causes this confusion, 2 examples:

Example 1: your latest 3.2.0i zip has wrong entry 3.0.13

Image

Example 2: the old 3.0.12f zip has wrong entry 2.0.0

Image

I know you don't use Arduino, that' the reason i am posting for you .. so maybe double check in future your library.json always, to avoid that folks are confused on there cuiurrent installed version ;)

Thx !

kaloprojects avatar May 31 '25 07:05 kaloprojects

That's right, I didn't bother with the library.json file. I didn't realise that this is used in the Arduino IDE and I did it manually for the last two releases. I will develop a Python script that updates the version automatically.

schreibfaul1 avatar May 31 '25 13:05 schreibfaul1

Hi @schreibfaul1 .. just a thought came in my mind, you might know best if this is a good idea or not:

In my latest projects i am using function which changed in syntax between versions, best example: audio.openai_speech(..)

In past (AUDIO.H version < 3.1.0u) the function had 6 parameter, since 3.1.0u it has 7 (you might remember, @akdeb added a new 4th parameter 'voice_instruction). Unfortunately without 'overloading', means the compiler produces ERROR if the code is not manually updated from user. (depending installed AUDIO.H version)

So my question: Could it make sense if you add any #define ESP32-AUDIOI2S-MASTER "versionxy" in header of audio.h .. which could be checked from any sketch ... (maybe won't help because even any 'if-then' might still produce compiler errors?) .. or is there any other trick to overcome the missed overloading for backwards compatibility ? Status now: i tell my user: 'check your AUDIO.H library version manually .. and remove the 4th parameter in code yourself if using < 3.1.0)

You have deeper skills than me in coding, so i was just wondering about any ideas ;)

kaloprojects avatar Jun 01 '25 08:06 kaloprojects

The fact that the version can be read out has not been around for very long, only since 29 Apr. 25. You could do it this way:

// Events from audioI2S library
void audio_info(const char* info) {
    if(strncmp("audioI2S Version ", info, 17) == 0) {
        log_w("audioI2SVersion: %s", info + 17);
        if(strcmp(info + 17, "3.3.0") <= 0) {
            log_w("You need at least audioI2S library version 3.3.0");
        }
        else{ log_w("> 3.0.0, Version is: %s", info + 17);}
    }
}

schreibfaul1 avatar Jun 01 '25 10:06 schreibfaul1

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 02 '25 02:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 16 '25 03:07 github-actions[bot]