cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
angelaniubo
Level: Powered On

audio recorder

Hi,

 

I'm trying to save audio from the PowerApps Microphone but I'm having some issues.

 

I've made it using a collect statement with the JSON wrapper to save the base64 string to a local collection and then with Flow I create a .web file in Sharepoint. This works all fine, but only on the web, in the PowerApps app the content of the file is the temporary file where the record is created on the device. To understand me better:

 

That is the result from the web:

"data:audio/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH/////////FUmpZpkq17GDD0JATYCGQ2hyb21lV0G…”

That is using the PowerApps app from mobile:

“TempFiles/microphone-audio834562465464673.3gp”

Testing from the W10 app the value is: “ms-appdata:///local/recording_c9e7edbe-ac44-4090-bd94-fd875dd7937b.m4a”

And from an other phone app the value is: “temp/recording_2C414554-8FB3-42CA-8974-16C656F07F9F-9853-000005CEBD4D681C.aac”

 

Does someone know if it is an issue from the App or is that we can do it in another way?

 

Does someone know if we can save the audio file from the web in a .wav file format?

 

Thank you in advance!!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: audio recorder

Hi @angelaniubo ,

Based on the issue that you mentioned, I think this issue is related to original audio data format. When you capture the audio data within your canvas app, the Output of the audio is in WEBM format rather than wav format.

So when you generated a .wav file based on the WEBM format binary data, the original audio format would not be changed. It just change the extension name of the audio file.

 

If you want to convert the WEBM format file into a WAV format file, I think Power Automate could achieve your needs. Please check and see if the following blog would help in your scenario:

https://kamdaryash.wordpress.com/ 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Community Support Team
Community Support Team

Re: audio recorder

Hi @angelaniubo ,

Actually, it is an known issue with Microphone control in PowerApps. The Important thing you need to know is that --  the Audio recorded through is stored in 3gp format in Android, AAC format in iOS, and OGG format in web browsers.

 

The user @Srinath has faced similar issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Working-with-microphone-audio-in-Power-Apps/...

 

If you want the generated audio file to be played well in any other devices, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

If you just want to achieve your needs in Web browser, I think PowerApps could achieve your needs. Please check and see if the following blog would help in your scenario:

https://qiita.com/h-nagao/items/d36e0ba5552cfe94ad07

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
angelaniubo
Level: Powered On

Re: audio recorder

Thank you @v-xida-msft for your response,

 

So now on I am going to do it from the Web browser. Do you know if there is any possibility to save the file in a .wav format? I need to process the audio file later and if I save the file with a .wav extension it is not created properly.

 

Regards,

 

Àngela

Community Support Team
Community Support Team

Re: audio recorder

Hi @angelaniubo ,

Have you take a try with the blog I provided above?

 

If you want to save the audio data into a .wav file, please check the blog I provided above. I have also made a test on my side, please consider take a try with the following workaround:

Flow's configuration as below:

3.JPG

Within the "Create file" action, File Name field set to following expression:

concat(utcNow(),'-audio.wav') 

File Content field set to following expression:

base64ToBinary(triggerBody()['Createfile_FileContent'])

 

App's configuration as below:

4.JPG

Set the OnStop property of the Microphone control to following:

 

Set(tempJSONString, Substitute(JSON(Microphone1.Audio, JSONFormat.IncludeBinaryData),"""",""));
'YourFlowName'.Run(Right(tempJSONString, Len(tempJSONString)-23));
Refresh(YourSPLibrary)

 

 

More details about firing a flow from a canvas app, please check the following video resource:

https://www.youtube.com/watch?v=1wl9AtxWdkg

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
angelaniubo
Level: Powered On

Re: audio recorder

Hi @v-xida-msft ,

 

I tried what you posted. The file is created and when I download it seems correct and it plays right, but it is not in a .wav format, when you analyze it, it is in webm format. Do you experience the same? Because I need to process the audio in a .wav format and I'm afraid I won't be able to do it.

 

Regards,

 

Àngela

Community Support Team
Community Support Team

Re: audio recorder

Hi @angelaniubo ,

Please take a try with the flow's configuration I provided above. Change the suffix of the File Name to '.wav' within the File Name field of the "Create file" action.

 

Please take a try with it, check if this issue is solved. Also please make sure the '.wav' format file is supported in your PC.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
angelaniubo
Level: Powered On

Re: audio recorder

Hi @v-xida-msft ,

 

Yes! I am doing it. 

Capture.JPG

 

 

I show you the output of an audio analyzer:

 Capture2.JPG 

As you can see it is a webm formatted audio hidden in a .wav extension.

Am I missing something?

 

Thank you,

 

Àngela

Community Support Team
Community Support Team

Re: audio recorder

Hi @angelaniubo ,

Based on the issue that you mentioned, I think this issue is related to original audio data format. When you capture the audio data within your canvas app, the Output of the audio is in WEBM format rather than wav format.

So when you generated a .wav file based on the WEBM format binary data, the original audio format would not be changed. It just change the extension name of the audio file.

 

If you want to convert the WEBM format file into a WAV format file, I think Power Automate could achieve your needs. Please check and see if the following blog would help in your scenario:

https://kamdaryash.wordpress.com/ 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

angelaniubo
Level: Powered On

Re: audio recorder

It solved my problem. Thank you so much!!

 

Àngela

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,765)