cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Cant get Microphone audio output

 

I want to get a base64 representation of the output of a Microphone controller. Whenever I try to pass the url (appres://blobmanager/ede0568a161f481cbaec6ce34304cfce/13) of the audio into a flow the string is passed rather than the file itself.

 

Functions like decodeDataURI() and base64ToBinary() attached to the compose connection cannot extract the file. For some reason when I add the file as an attachemnt to an email, the base64 file is added and can be decoded to show the audio file. 

 

Has anyone come across this before? It looks like the camera input will correctly return the base64 encoded image from Camera.Photo, but the AddPhoto and Microphone controlls only return blob adresses. It seems strange that getting the audio file out is so difficult, am I missing something obvious?

 

Thanks for any advice.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Cant get Microphone audio output

The work around I posted above no longer works for some reason, but I have found a much better solution. As far as I can tell the problem is that PowerApps tries to convert the file somehow when it sends it to Flow, and this cannot be done for the audio file which causes the appres://blobmanager reference to be sent instead. If the Flow variable was established as an email attachment, this conversion must have worked for some reason, and so we got the file. If instead we create a connector to an azure blob within PowerApps, then upload the audio file to that blob from within PowerApps, we can avoid ever having to do the conversion to Flow. And since blobs accept most data types, the file converts correctly and we get an Ogg file. From there we can just reference it in flow. TLDR: Save the Microphone.Audio to a blob from within PowerApps(NOT Flow). Then in your flow use the "Get blob content" action to retrieve the file. (And if you need it specifically as a base64 string, use the base64() function to encode it)

View solution in original post

3 REPLIES 3
TopShelf-MSFT
Level 10

Re: Cant get Microphone audio output

Hi @Anonymous thank you for posting this question. I came across a post that may assist. Can you review the below thread and advise if it solves your issue?

 

https://powerusers.microsoft.com/t5/General-Discussion/Media-in-Base64/m-p/94576 

 

@TopShelf-MSFT

Anonymous
Not applicable

Re: Cant get Microphone audio output

Thanks for the reply TopShelf-MSFT. Unfortunately that thread link seems to be broken? I found a solution, more of a work around though so I'd still be keen to know how to do this properly. At the moment I'm adding the sound file as an email attachment in my flow, which will generate a variable name for the attachment. I then use the same variable as my input to an azure function and I successfully get the base64 interpretation. As mentioned before, if I skip the email step and just create a new variable for the input to the azure function I get the blob uri instead. Thanks for the help.
Anonymous
Not applicable

Re: Cant get Microphone audio output

The work around I posted above no longer works for some reason, but I have found a much better solution. As far as I can tell the problem is that PowerApps tries to convert the file somehow when it sends it to Flow, and this cannot be done for the audio file which causes the appres://blobmanager reference to be sent instead. If the Flow variable was established as an email attachment, this conversion must have worked for some reason, and so we got the file. If instead we create a connector to an azure blob within PowerApps, then upload the audio file to that blob from within PowerApps, we can avoid ever having to do the conversion to Flow. And since blobs accept most data types, the file converts correctly and we get an Ogg file. From there we can just reference it in flow. TLDR: Save the Microphone.Audio to a blob from within PowerApps(NOT Flow). Then in your flow use the "Get blob content" action to retrieve the file. (And if you need it specifically as a base64 string, use the base64() function to encode it)

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (7,086)