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

Re: saving microphone audio

Can you please tell me how to send the audio file to your e-mailbox?

 

When i use Microsoft Flows and the code below i get an error:

Speech_test.run(Microphone1.Audio)

 

Highlighted
Frequent Visitor

Re: saving microphone audio

 

 

 

I recreated the PowerApp and a new Flow. In the flow , in the attachment (advanced options) of the e-mail action step, select "Ask In PowerApps:, this creates a new attribute "SendAnEmail_body"

In the PowerApp, in the OnStop of the AudioRecording element, Type VoiceToEmail.run(Microphone1.audio)

When I test this, I get an email with an attachment. The attachmentname must have a value (not in the screenshot)

I hope the screenshots explain the rest.

 

FlowFlow

PowerAppPowerApp

Highlighted
Anonymous
Not applicable

Re: saving microphone audio

Thanks @mpjjonker!

Highlighted
Solution Sage
Solution Sage

Re: saving microphone audio

Hello,

You can also send audio and images by mail, by using the Office 365 Outlook connector and this formula:

Office365.SendEmail(TextInput1.Text,"Test send media","Test",{Attachments:Table({Name:"Audio.mp4", ContentBytes:Microphone1.Audio},

{Name:"Image.jpg", ContentBytes:AddMediaButton1.Media,})})

TextInput1 should have the Email address that you would like to send the email to.

Windows media player didn't open the audio file. VLC did.


Highlighted
Solution Sage
Solution Sage

Re: saving microphone audio

Also about saving microphone audio we used a custom API.
It should be defined like this in the swagger file:

"AudioTest":{
"type": "object",
"properties": {
"Audio":{"format":"byte","type":"string"}
}}

By using this we received a Base64 string.
Next step was to send it back to Powerapps. It worked.
We had the string but we couldn't hear the sound though.
The solution is, for some reason that I can't understand, to have the Base64 string inside the Text function.

For example if you receive the string and have it at the first record inside the AudioCollection under the AudioColumn then you should have at the audio control:

Audio1.Media=Text(First(AudioCollection).AudioColumn)

And TANTAN. It works. Also for the other media. Image and peninput.

Highlighted
Frequent Visitor

Re: saving microphone audio

Thanks ! I will try this out and report back.

Highlighted
Solution Sage
Solution Sage

Re: saving microphone audio

Hello @mpjjonker,

I did some testing and it doesn't work with audio anymore. I don't know why.
I guess they changed something. I am sorry if I got your hopes up.
It is still working with Images and PenInputs.
Last year, I tested audios and it was working fine. I will update if I have any news.

Highlighted
Anonymous
Not applicable

Re: saving microphone audio

I was able to saving my recording form my PowerApps to a SharePoint list using Flow, however it was in a unplayable formate.

 

Any idea on how I can fix this?

 

I tried the Email method as well but that too did not work.

Highlighted
Solution Sage
Solution Sage

Re: saving microphone audio

Hello Joshsolomid,

I haven't tried to save it to a Sharepoint list but I think you should try to add .mp4 as an extension to the filename.
So when you save it, I can see on the attached picture of the flow that you have that you ask for the filename in Powerapps
File Name ---> |Addattachment|.
Can you try to add .mp4 to the filename in flow? File Name ---> |Addattachment|.mp4 

Highlighted
Advocate II
Advocate II

Re: saving microphone audio

You can also save it to a MS SQL database  (varbinary type)

 

Like:

 

Patch(
    '[dbo].[tblMMMemos]',
    Defaults('[dbo].[tblMMMemos]'),
    {
        ID: lblID.Text,
        Contact: "",
        Name: lblCurrentUser.Text,
        AudioClip: MyMic.Audio
    }
);

 

 

Later I play it back from the database using an (classic) asp file:

 

<% 
 response.clear
 response.contenttype = "audio/ogg"
 openConn con
 iID=request("ID")
 Set cmdAudio = Server.CreateObject("ADODB.Command")
 cmdAudio.ActiveConnection=con
 cmdAudio.Prepared = true
 cmdAudio.commandtext="SELECT AudioClip FROM tblMMMemos WHERE ID=?"
 cmdAudio.Parameters.Append cmdAudio.CreateParameter("@ID", adInteger, adParamInput, , iID)
 set rstAudio = cmdAudio.execute
 if not rstAudio.eof then
  response.BinaryWrite(rstAudio("AudioClip"))
 end if
 
 closeconn con
%>
 
 

The URL of this page you can feed to your audio component in Powerapps

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,983)