How to use this to play several sounds? #238
HeikkiHietala
started this conversation in
General
Replies: 2 comments
-
I did that in the Miniwebradio project https://github.com/schreibfaul1/ESP32-MiniWebRadio. Download the Content_on_SD_Card.zip file. There you will find a folder 'voice_time' count = 3
audio.connecttoSD('/voice_time/001.mp3'); and void audio_eof_mp3(const char * info) {
if (count> 0) {
if (count == 1) {audio.connecttoSD('/voice_time/080.mp3'); count--;} // stroke
if (count == 2) {audio.connecttoSD('/voice_time/200.mp3'); count--;} // precisely
if (count == 3) {audio.connecttoSD('/voice_time/O'clock.mp3'); count--;}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Oh, great stuff! And I believe this works with SPIFFS too merely by pointing to that memory? Also, I'd like to stay within the Arduino IDE and INO field, if in any way possible. Is this doable with that in mind? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I am very happy for having found this excellent library, and I have it playing SPIFFS MP3 files already.
I am working on a talking clock, so I have sound MP3 clips for all the times between 1 to 59 and also oh1 to oh9.
The issue is to figure out a way of calling two separate audio files sequence, preferably so that I could call a function:
void SayTime(myHours, myMinutes)
and within there I could play the correct sounds, say, 14.mp3 and 45.mp3 to make the robot say, fourteen fourty five.
I am stuggling however with the clip control, how to load more than one of them, play them until end of file, and then dismounting the file to save resources.
If there was an example showing this, I would love to learn of it.
Again, thank you very much for writing this library!
Beta Was this translation helpful? Give feedback.
All reactions