Play Audio flow function not working

I recorded an audio using Record Audio flow function. I used the output path as the source for Play Audio and it says “resource not found”. But when I use Open Audio Player to play it - it works. I need help understanding why Play Audio errors and Open Audio Player doesnt.

I guess this leads me to this question - What exactly should the Audio Playback ID be set to in the Play Audio flow function? Maybe this is my problem. I have no idea what to put in that field, and its required, so I just put 0.

Hi! What you need is to preload the audio for playback for the Play Audio to work!

The Preload Audio function errors the same. And curiously, it also requires an ID value. Where does this value come from? I would have presumed that this flow function would Generate the ID for the Play Audio function. ???

Um, the preload audio function is where you can yourself choose the id value, as explained in the documentation :sweat_smile:

This setup is working for me in 1.9.22, if something like this doesn’t work for you I’d assume perhaps there is a trouble with the audio source :thinking: Try just to check with https://www2.cs.uic.edu/~i101/SoundFiles/ImperialMarch60.wav as well

Screenshot 2020-10-29 at 9.38.24 Screenshot 2020-10-29 at 9.38.43

Try using the local file path created by the Record Audio flow function. I should note also im testing on Android.

Hi! Sorry I left this hanging :grimacing: And I probably need to look into this some more, because our test for playing a recorded audio looked like this:

Screenshot 2020-11-09 at 9.55.08

This setup worked on 2.4.5 on iOS, but for some reason the Android would not work, which may be an issue with the file path or something, but I’ll have to ask around a little. However, you could try a similar setup and see if it works for you?

Hi! Just to let you know, I managed to miss it before but apparently there’s a bug on Android with this specific functionality :pensive: so until it gets fixed, I’m afraid I know of no workaround that would work :frowning_face:

It seems to be something to do with how it reads the android file.path incorrectly. Maybe

1 Like

I just figured out that Play Audio will not work with a file path that begins with “File://”

So when the “Move/Rename file/directory” flow function spits out this:
File:///storage/emulated/0/Download/audio_file.aac

I do LEFT_STRIP(File:///storage/emulated/0/Download/audio_file.aac, 7) to get this:
/storage/emulated/0/Download/audio_file.aac

Which works.

Now curiously, I don’t need to do the “Preload Audio for playback” flow function before the “Play Audio” flow function. It just works going straight to ‘Play Audio’.