Is there a way to upload recorded sound files to a database and retrieve it and play two or more files simultaneously?


Hello! I wanted to ask for some help on a recording function based app I was trying to make. I basically want to make an app that could store two or three sound files on a cloud database, allow for another (or yourself) to retrieve all three (or more) sound files, and play all of them at the same time, simultaneously.

The workflow I have in mind is this:

  1. start/stop recording: records the sound and saves it as a 3gp file
  2. (don't have this button yet but) press a button to upload the file to a database
  3. (don't have this button yet but) press a button to retrieve all sound files from said database
  4. press play button to play them all simultaneously (over one another)

I currently have only the record/stop/save/play function working, and I have no idea how I should continue with this idea. Any help (a sense of direction, what features I should look into e.x. firebase, or any detailed instructions to help me achieve this goal) is welcome. Also, if such a function wouldn't even be possible in AppInventor, then please let me know. Thank you so much for everyone's help.

1 Like
  1. I couldn't find a sound recorder that stores a file as a .3pg, but I found one that stores it as a .wav: GitHub - G10DRAS/WavSoundRecorderExtension: Wav Sound Recorder Extension for App Inventor 2

  2. This is easy, you can use either CloudDB or firebaseDB to store the values. Just make sure to concatenate it (as a list), instead of replacing it.

  3. Again, very easy. You can use either of the two options listed in point 2. Store this data in a temporary variable to make point 4 easier.

  4. You'll have to use the DynamicComponents extension to create a Player element for each sound file, and then play all of them together.

1 Like

Hi, thank you so much for the reply! I have a few questions:

  1. my current app that I have is saving the sound file as a 3gp, as the "soundrecorder.savedRecording to (directory)" only worked with the line shown in the photo that I uploaded of my blocks, which is in 3gp (I had many problems with this which was solved by that file directory). Would my other processes still work if I just continue with this file type?

  2. could you provide me with some links or instructions on how to set up the could databases and all that? I also read that I need a storage extension or something like that to upload sound files onto firebase. could you tell me how these work?

I have more questions, but I think this would be a great starting point. Please excuse my inexperience, I am an absolute beginner for app making and appinventor. Thank you so much for the help.

1 Like

Yes, any file type should be fine.

On Android 11+ the Shared folder /Music does not accept .3gp files, but .mp3.

See also here:

1 Like

Considering OP wants to store it on the cloud, I think it should be fine (since you're not storing it locally).
Please correct me if I'm wrong.