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

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
Anonymous
Not applicable

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 

 

@Anonymous

Anonymous
Not applicable

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

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,741)