cancel
Showing results for 
Search instead for 
Did you mean: 
cha_cha

Connecting to Azure OpenAI Whisper Service in Power Automate

Table of Contents

 

Prerequisites

  • An Azure Subscription with Azure OpenAI Service enabled. Azure OpenAI Service is currently limited. Apply for access here to your subscription by going to this link (https://aka.ms/oaiapply).
  • Power Automate Premium

High Level Steps

  • Step 1: Create Azure OpenAI Service in Azure
    • Retrieve Service Endpoint URI and Key (either Key 1 or Key 2)
  • Step 2: Create a Whisper Deployment
    • Retrieve Deployment Name
  • Step 3: Create an HTTP Flow in Power Automate

Step 1: Create Azure OpenAI Service:

  • Navigate to the Azure portal and create a new OpenAI service. Select the appropriate subscription and resource group, and ensure you choose a supported region
  • As of this writing (12 May 2024), the currently supported regions are: East US 2, South India, North Central US, Norway East, Sweden Central, and West Europe.

Create Azure OpenAI Service

1. In Azure, search for Azure OpenAI Service then click create.

cha_cha_3-1715491793280.png

cha_cha_4-1715491856504.png

 

2. Follow the following settings. I am using South India since that is the closest regional location for my case. Once done, click Review + Create and wait for it to be completed.

cha_cha_1-1715486758923.png

 

Copy a Key and the Endpoint URI

1. Once the resource has been created, head over to the Resource > {the resource you just created} > Keys and EndPoint

cha_cha_0-1715491284795.png

 

Step 2: Create a Whisper Deployment

Once your Azure OpenAI service is set up, you need to create a Whisper deployment. This is your dedicated instance for handling audio transcriptions and translations.

 

1. Navigate to https://oai.azure.com/portal and select the Resource that you have created in step 1.

2. Navigate to Deployments then select Create new deployment

cha_cha_0-1715491527019.png

3. Put the following settings for the deployment then click Create.

cha_cha_1-1715491642105.png

 

cha_cha_2-1715491708970.png

 

Step 3: Create an HTTP Flow in Power Automate

Open Power Automate and create a new flow using the HTTP request trigger. Configure it to connect to your Whisper deployment. This flow will be responsible for sending audio files to the Whisper service and retrieving the transcription.

 

1. Create a manually triggered flow.

 

cha_cha_0-1715489824538.png

 

2. Add File input to the trigger.

cha_cha_1-1715489839041.png

cha_cha_2-1715489870097.png

3. Add a Compose action and replace the follow place holder with the input file's filename and contentBytes.

cha_cha_3-1715489914538.png

 

 

 

 

 

{
  "$content-type": "multipart/form-data",
  "$multipart": [
    {
      "headers": {
        "Content-Disposition": "form-data; name=\"file\"; filename=\"@{triggerBody()?['file']?['name']}\""
      },
      "body": {
        "$Content-type": "audio/webm",
        "$content": @{triggerBody()?['file']?['contentBytes']}
      }
    }
  ]
}

 

 

 

 

 

 

4. Add an HTTP action with the following parameters.

 

URI:

 

 

 

 

FORMAT:
{Step 1 EndPoint}/openai/deployments/{Step2 Deployment}/audio/transcriptions?api-version=2024-02-01

EXAMPLE:
https://whisper-prototype-ai.openai.azure.com/openai/deployments/speech-to-text/audio/transcriptions?api-version=2024-02-01

 

 

 

 

 

Method:

POST

 

Headers:

content-type: multipart-form/data

api-key: [use the key from Step 1]

 

Body:

Output of Compose Action

cha_cha_0-1715490163054.png

 

5.  Optional: Add another Compose action to display result.

 

 

 

 

outputs('HTTP')['body']['text']

 

 

 

 

cha_cha_0-1715491136347.png

 

About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: https://ganeshsanapblogs.wordpress.com/about MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: https://linkedin.com/in/manueltgomes and twitter http://twitter.com/manueltgomes. I also write at https://www.manueltgomes.com, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/