AI_Thinker Board - Arduino Configuration and Metadata Live Capture Query #1710
-
I wanted to thank you for your examples using the AI Thinker A1S Auudio Kit board. Like you I wanted to try some audio development without having all the jumper wires from my usual ESP development boards so purchased from Amazon an AI Thinker audio Lyrat clone. It came with no instructions or information and I was at a lost how to use. Your posts saved the day. I spent much of yesterday and this morning getting your examples to work. Thought you might benefit from some feedback. First: I think you should add somewhere in your AI Thinker Audio Kit description how to set the board in the Arduino IDE. I had a lot of trouble with out of memory issues while trying to compile your examples. I wonder how you set up your board. Mine is now set up as: ESP Dev Module I found the default memory settings limited text memory to about 1.2M and much of your code took 1.3M so had crashes. Changing to the huge app memory configuration worked for me but still not sure it is the best option. I will admit I was totally confused by the ESP-IDF Lyrat board set up when I tried to use the ESP-ADF. Your Arduino approach was much easier. I also thought my board had 8MB from purchase info, but checking only found 4MB. I am not sure of the PSRAM amount. Second issue: I want to port one of my internet radio ESP32-S3 ->i2S->MAX98357 to the AI Thinker-AIS->I2S->8388 output. The S3 version uses the audio.h extensions to strip the metadata from running streams and move to a simple info structure where I find the Station Name when I change the URL to a new station.. The song Title is obtained each time a new song starts in the stream. I output that information to a small i2c display screen (1” 128x64). I also use a simple IR sensor with a low cost ELEGGO IR clicker to select channels and to adjust the amplifier volumes. Expect to use the buttons instead of IR on the AI Thinker and attach a serial monitor if needed. When I tried your metadata 2 example I see the initial header in the serial monitor but then get unwanted streaming blocks and no audio is output. I do get audio from your stream-url-icy-audiokit example and was able to add the URLs that I like and use the next/prev buttons to move thru the stations. I am getting loud stutters{ “ da da da ….”] while changing stations and code is not timing out if a connection fails so have to reboot sometimes. I hope you and others might have some suggestions. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
The sketch size really depends on the sketch and you need to select the partition scheme accordingly with what functionality you want to use. Huge App is usually a good default setting. I think RainMaker 4 MB no OTA will give you all 4 MB for your program. Please google the topic PSRAM and ESP32: though it has 8MB you can only directly address 4 MB. The example sends the output to I2SStream. The AudioKit needs the codec to be set up to work, so just replace this with an AudioBoardStream and you should start to hear some sound. You can use the MetaDataType parameter in the callback to select the values that are relevant to you. |
Beta Was this translation helpful? Give feedback.
-
Thank you and will try the adjustments. I have often ported my Arduino codes to platformio on VS Code so wonder if you might also have a platformio.ini configuration file for the AudioKit board to share? Also have been thinking about moving the network name and password from embedding in the code to the sd card. The same with my list of streaming urls. My kids and grandchildren live all over the states and I have to frequently change the network connection for my devices when visiting or vacationing. This currently requires a code edit and recompile so wonder how you or others recommend I handle. |
Beta Was this translation helpful? Give feedback.
-
Wow. The last comment to look harder at the AutoPlayer documentation solved this issue for me. Set AutoLogger to Warning Level, and added a single line to setup player section as well inserted the printMetaData subroutine from the metadata2 example. This code is also playing non-chirping audio output which I suspect was from the autologger info level dumping too much out. Example output shows a few real errors and warnings. I moved thru two US urls and the moved to liink in Switzerland. That link, after a long pause, repaired and the program ran on. Below shows the serial moinitor output. .. Thank you Phil Schatzmann! |
Beta Was this translation helpful? Give feedback.
The sketch size really depends on the sketch and you need to select the partition scheme accordingly with what functionality you want to use. Huge App is usually a good default setting. I think RainMaker 4 MB no OTA will give you all 4 MB for your program.
Please google the topic PSRAM and ESP32: though it has 8MB you can only directly address 4 MB.
The example sends the output to I2SStream. The AudioKit needs the codec to be set up to work, so just replace this with an AudioBoardStream and you should start to hear some sound. You can use the MetaDataType parameter in the callback to select the values that are relevant to you.