cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

saving microphone audio


Hello,

I wondered if there is any way to write out the audio from the microphone input. Some chap asked on the "Learn" page ( http://disq.us/p/1cc2pal ) corresponding to that control, but recieved no response. I am hard pressed to think of an instance where I would want to record audio & only use it in the app that did the recording. Is there something I am missing? Can we just save it anywhere, like a text record? I'm thinking "no".

 

There is documentation on how to get the audio into the PowerApp, but nothing to get the audio back out. Are we meant to run it all through Cortana before we can move the data elsewhere? If so, why not just have a STT input instead? I guess I could go old-school & dub it out if my headphone jack...

 

Cheers!

—D of A.V.L.ien

27 REPLIES 27
Anonymous
Not applicable

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)

 

 

 

 

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

Anonymous
Not applicable

Thanks @mpjjonker!

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.


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.

Thanks ! I will try this out and report back.

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.

Anonymous
Not applicable

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.

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 

Advocate II
Advocate II

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,656)