Power Community

Power Community

How to Convert Speech to Text from Canvas PowerApps (Part III Microsoft Flow)

Lets see this in 3 Different Blogs, Here we start with Microsoft Azure

Pre-Requisites :

1. Navigate to https://make.powerautomate.com

2. Select New –> Select Instant Cloud Flow

3. Add Step –> Initialize Variable

rampprakash_0-1679038194550.png

Add Value as ASK FROM POWERAPPS

4. Add Another Variable

rampprakash_1-1679038220574.png

replace(variables('Data'),'data:audio/webm;base64,','')

5. Add Compose to Convert to JSON

rampprakash_2-1679038268441.png

json(variables('ReplaceValues'))

6. Now Add Parse JSON and Pass input from COMPSE

rampprakash_3-1679038308430.png

{
    "type": "object",
    "properties": {
        "Url": {
            "type": "string"
        }
    }
}

7. Get the Value from JSON and Pass value as URL

rampprakash_4-1679038361172.png

8. Trigger a HTTP Request to Function app (URL : Function APP URL)

rampprakash_5-1679038428381.png

9. Trigger HTTP Request for Cognitive Service with KEY and Content Type

rampprakash_6-1679038496948.png

Here the URL will be Your Cognitive URL and Key as Cognitive Key

10. Parse JSON and the Input from Point 9

rampprakash_7-1679038558575.png

{
    "type": "object",
    "properties": {
        "RecognitionStatus": {
            "type": "string"
        },
        "Offset": {
            "type": "integer"
        },
        "Duration": {
            "type": "integer"
        },
        "NBest": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "Confidence": {
                        "type": "number"
                    },
                    "Lexical": {
                        "type": "string"
                    },
                    "ITN": {
                        "type": "string"
                    },
                    "MaskedITN": {
                        "type": "string"
                    },
                    "Display": {
                        "type": "string"
                    }
                },
                "required": [
                    "Confidence",
                    "Lexical",
                    "ITN",
                    "MaskedITN",
                    "Display"
                ]
            }
        },
        "DisplayText": {
            "type": "string"
        }
    }
}

10. At last Respond to PowerApps

rampprakash_8-1679038591429.png

That’s it 🙂

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Web resource method does not exist in Dynamics 365 CE

Got the below error while working on Onload of Account record JavaScript in Microsoft Dynamics 365 CE. Script Error One of...

More Articles Like This

- Advertisement -spot_img