-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read mp3 file from the SD card #7
Comments
Hi, Thanks for your interest, at the moment it is not possible, the component does not support reading from the sd card yet. You have a great use case, I take it into account while developing the reading and try to implement it. I have never use the audio aspect of esphome, could you tell me what hardware you plan to utilize? |
Hi @n-serrette, Thank you for showing the interest in my use-case. I'm currently using ESP32 and ESP32-S3 (with PSRAM), together with MAX98357 DAC. In the long run, I would like to have stored these files on the SD card. Before switching to the ESPHOME scripting, I wrote Arudino code that worked following this tutorial: https://dronebotworkshop.com/esp32-i2s/ I very unfamiliar with the C/C++ code (know to read and understand it, hard to write anything new), so I can't help you on your quest. But this is a very good and promising library. |
Hi, Thanks for the detail, I will try to procure some hardware to develop this but I cannot make promise en the timing. In the mean time I have added a simple read_file function. std::vector<uint8_t> read_file(char const *path);
std::vector<uint8_t> read_file(std::string const &path); Return the whole file as a vector, trying to read large file will saturate the esp memory
You can try playing a file with the Speaker Component - speaker.play:
id: my_speaker
data: return id(esp_camera_sd_card)->read_file("/file"); |
Hey, thank you very much for the addition. Will try to find some time to setup sdcard together with esp32-s3 and will let you know the outcome. |
Hi @n-serrette ,
Can I create esphome media_player that would pool files locally from the SD card, using your library for reading sd card files?
The text was updated successfully, but these errors were encountered: