Select Page

In this post on OpenAI and Microsoft Power Apps, we will create a Text-to-Speech Power App using OpenAI Whisper.

OpenAI whisper is OpenAI’s Text-to-Speech service, offering human-like natural voice (5 options to choose from) and the ability to convert to audio.

The Power App integrates with Power Automate and makes HTTP calls to OpenAI using REST API. For this to work, you will need a paid OpenAI account with credit to call the API.

Creating a Text-to-Speech Power App Using OpenAI Whisper

The following screenshot shows what the application looks like. The design uses the Microsoft Teams theme that is available in Power Apps.

Get an API Key from OpenAI

The first step in the process is to get an API Key from OpenAI. The API Key allows us to programmatically access the OpenAI service. To get a key, log in to OpenAI.

Click on Your Profile link

Select Use API Keys (Note, OpenAI switched to Project API Keys)

Create an API Key and save it for later.

After creating the key, we need to create a Power App and a Power Automate flow that sends a POST HTTP request to OpenAI with a text the Power App will provide.

Creating a Text-to-Speech Power App

From the Power Apps portal, create a new Tablet or Mobile application. In our case, we selected a Mobile application with three controllers.

  • TextInput Canvas (Multilines)
  • Button Canvas
  • Audio Player

Create Power Automate Flow

We need to create a Power Automate flow for the Power App to call OpenAI Whisper and pass in the text to convert to audio.

Click on Power Automate from the Power App and create a new flow.