Skip to content

Commit c68717c

Browse files
Merge pull request #230272 from eric-urban/eur/power-automate-batch
Power automate batch connector
2 parents 7b1c6cf + 0880ead commit c68717c

10 files changed

+154
-0
lines changed
161 KB
Loading
38.8 KB
Loading
89.2 KB
Loading
23.9 KB
Loading
65.4 KB
Loading
2.07 KB
Loading
48.3 KB
Loading
103 KB
Loading
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
title: Power automate batch transcription - Speech service
3+
titleSuffix: Azure Cognitive Services
4+
description: Transcribe audio files from an Azure Storage container using the Power Automate batch transcription connector.
5+
services: cognitive-services
6+
manager: nitinme
7+
author: eric-urban
8+
ms.author: eur
9+
ms.service: cognitive-services
10+
ms.subservice: speech-service
11+
ms.topic: how-to
12+
ms.date: 03/09/2023
13+
---
14+
15+
# Power automate batch transcription
16+
17+
This article describes how to use [Power Automate](/power-automate/getting-started) and the [Azure Cognitive Services for Batch Speech-to-text connector](/connectors/cognitiveservicesspe/) to transcribe audio files from an Azure Storage container. The connector uses the [Batch Transcription REST API](batch-transcription.md), but you don't need to write any code to use it. If the connector doesn't meet your requirements, you can still use the [REST API](rest-speech-to-text.md#transcriptions) directly.
18+
19+
In addition to [Power Automate](/power-automate/getting-started), you can use the [Azure Cognitive Services for Batch Speech-to-text connector](/connectors/cognitiveservicesspe/) with [Power Apps](/power-apps) and [Logic Apps](/azure/logic-apps/).
20+
21+
> [!TIP]
22+
> Try more Speech features in [Speech Studio](https://aka.ms/speechstudio/speechtotexttool) without signing up or writing any code.
23+
24+
## Prerequisites
25+
26+
[!INCLUDE [Prerequisites](./includes/common/azure-prerequisites.md)]
27+
28+
## Create the Azure Blob Storage container
29+
30+
In this example, you'll transcribe audio files that are located in an [Azure Blob Storage](../../storage/blobs/storage-blobs-overview.md) account.
31+
32+
Follow these steps to create a new storage account and container.
33+
34+
1. Go to the [Azure portal](https://portal.azure.com/) and sign in to your Azure account.
35+
1. <a href="https://portal.azure.com/#create/Microsoft.StorageAccount-ARM" title="Create a Storage account resource" target="_blank">Create a Storage account resource</a> in the Azure portal. Use the same subscription and resource group as your Speech resource.
36+
1. Select the Storage account.
37+
1. In the **Data storage** group in the left pane, select **Containers**.
38+
1. Select **+ Container**.
39+
1. Enter a name for the new container such as "batchtranscription" and select **Create**.
40+
1. Get the **Access key** for the storage account. Select **Access keys** in the **Security + networking** group in the left pane. View and take note of the **key1** (or **key2**) value. You'll need the access key later when you [configure the connector](#create-a-power-automate-flow).
41+
42+
Later you'll [upload files to the container](#upload-files-to-the-container) after the connector is configured, since the events of adding and modifying files kick off the transcription process.
43+
44+
## Create a Power Automate flow
45+
46+
### Create a new flow
47+
48+
1. [Sign in to power automate](https://make.powerautomate.com/)
49+
1. From the collapsible menu on the left, select **Create**.
50+
1. Select **Automated cloud flow** to start from a blank flow that can be triggered by a designated event.
51+
52+
:::image type="content" source="./media/power-platform/create-automated-cloud-flow.png" alt-text="A screenshot of the menu for creating an automated cloud flow." lightbox="./media/power-platform/create-automated-cloud-flow.png":::
53+
54+
1. In the **Build an automated cloud flow** dialog, enter a name for your flow such as "BatchSTT".
55+
1. Select **Skip** to exit the dialog and continue without choosing a trigger.
56+
57+
### Configure the flow trigger
58+
59+
1. Choose a trigger from the [Azure Blob Storage connector](/connectors/azureblob/). For this example, enter "blob" in the search connectors and triggers box to narrow the results.
60+
1. Under the **Azure Blob Storage** connector, select the **When a blob is added or modified** trigger.
61+
62+
:::image type="content" source="./media/power-platform/flow-search-blob.png" alt-text="A screenshot of the search connectors and triggers dialog." lightbox="./media/power-platform/flow-search-blob.png":::
63+
64+
1. Configure the Azure Blob Storage connection.
65+
1. From the **Authentication type** drop-down list, select **Access Key**.
66+
1. Enter the account name and access key of the Azure Storage account that you [created previously](#create-the-azure-blob-storage-container).
67+
1. Select **Create** to continue.
68+
1. Configure the **When a blob is added or modified** trigger.
69+
70+
:::image type="content" source="./media/power-platform/flow-connection-settings-blob.png" alt-text="A screenshot of the configure blob trigger dialog." lightbox="./media/power-platform/flow-connection-settings-blob.png":::
71+
72+
1. From the **Storage account name or blob endpoint** drop-down list, select **Use connection settings**. You should see the storage account name as a component of the connection string.
73+
1. Under **Container** select the folder icon. Choose the container that you [created previously](#create-the-azure-blob-storage-container).
74+
75+
### Create SAS URI by path
76+
77+
To transcribe an audio file that's in your [Azure Blob Storage container](#create-the-azure-blob-storage-container) you need a [Shared Access Signature (SAS) URI](/azure/storage/common/storage-sas-overview) for the file.
78+
79+
The [Azure Blob Storage connector](/connectors/azureblob/) supports SAS URIs for individual blobs, but not for entire containers.
80+
81+
1. Select **+ New step** to begin adding a new operation for the Azure Blob Storage connector.
82+
1. Enter "blob" in the search connectors and actions box to narrow the results.
83+
1. Under the **Azure Blob Storage** connector, select the **Create SAS URI by path** trigger.
84+
1. Under the **Storage account name or blob endpoint** drop-down, choose the same connection that you used for the **When a blob is added or modified** trigger.
85+
1. Select `Path` as dynamic content for the **Blob path** field.
86+
87+
By now, you should have a flow that looks like this:
88+
89+
:::image type="content" source="./media/power-platform/flow-progression-sas-uri.png" alt-text="A screenshot of the flow status after create SAS URI." lightbox="./media/power-platform/flow-progression-sas-uri.png":::
90+
91+
### Create transcription
92+
93+
1. Select **+ New step** to begin adding a new operation for the [Azure Cognitive Services for Batch Speech-to-text connector](/connectors/cognitiveservicesspe/).
94+
1. Enter "batch speech-to-text" in the search connectors and actions box to narrow the results.
95+
1. Select the **Azure Cognitive Services for Batch Speech-to-text** connector.
96+
1. Select the **Create transcription** action.
97+
1. Create a new connection to the Speech resource that you [created previously](#prerequisites). The connection will be available throughout the Power Automate environment. For more information, see [Manage connections in Power Automate](/power-automate/add-manage-connections).
98+
1. Enter a name for the connection such as "speech-resource-key". You can choose any name that you like.
99+
1. In the **API Key** field, enter the Speech resource key.
100+
101+
Optionally you can select the connector ellipses (...) to view available connections. If you weren't prompted to create a connection, then you already have a connection that's selected by default.
102+
103+
:::image type="content" source="./media/power-platform/flow-progression-speech-resource-connection.png" alt-text="A screenshot of the view connections dialog." lightbox="./media/power-platform/flow-progression-speech-resource-connection.png":::
104+
105+
1. Configure the **Create transcription** action.
106+
1. In the **locale** field enter the expected locale of the audio data to transcribe.
107+
1. Select `DisplayName` as dynamic content for the **displayName** field. You can choose any name that you would like to refer to later.
108+
1. Select `Web Url` as dynamic content for the **contentUrls Item - 1** field. This is the SAS URI output from the [Create SAS URI by path](#create-sas-uri-by-path) action.
109+
110+
> [!TIP]
111+
> For more information about create transcription parameters, see the [Azure Cognitive Services for Batch Speech-to-text](/connectors/cognitiveservicesspe/#create-transcription) documentation.
112+
113+
1. From the top navigation menu, select **Save**.
114+
115+
### Test the flow
116+
117+
1. From the top navigation menu, select **Flow checker**. In the side panel that appears, you shouldn't see any errors or warnings. If you do, then you should fix them before continuing.
118+
1. From the top navigation menu, save the flow and select **Test the flow**. In the window that appears, select **Test**.
119+
1. In the side panel that appears, select **Manually** and then select **Test**.
120+
121+
After a few seconds, you should see an indication that the flow is in progress.
122+
123+
:::image type="content" source="./media/power-platform/flow-progression-test-started.png" alt-text="A screenshot of the flow in progress icon." lightbox="./media/power-platform/flow-progression-test-started.png":::
124+
125+
The flow is waiting for a file to be added or modified in the Azure Blob Storage container. That's the [trigger that you configured](#configure-the-flow-trigger) earlier.
126+
127+
To trigger the test flow, upload an audio file to the Azure Blob Storage container as described next.
128+
129+
## Upload files to the container
130+
131+
Follow these steps to upload [wav, mp3, or ogg](batch-transcription-audio-data.md#supported-audio-formats) files from your local directory to the Azure Storage container that you [created previously](#create-the-azure-blob-storage-container).
132+
133+
1. Go to the [Azure portal](https://portal.azure.com/) and sign in to your Azure account.
134+
1. <a href="https://portal.azure.com/#create/Microsoft.StorageAccount-ARM" title="Create a Storage account resource" target="_blank">Create a Storage account resource</a> in the Azure portal. Use the same subscription and resource group as your Speech resource.
135+
1. Select the Storage account.
136+
1. Select the new container.
137+
1. Select **Upload**.
138+
1. Choose the files to upload and select **Upload**.
139+
140+
## View the transcription flow results
141+
142+
After you upload the audio file to the Azure Blob Storage container, the flow should run and complete. Return to your test flow in the Power Automate portal to view the results.
143+
144+
:::image type="content" source="./media/power-platform/flow-progression-test-succeeded.png" alt-text="A screenshot of all steps of the flow succeeded." lightbox="./media/power-platform/flow-progression-test-succeeded.png":::
145+
146+
You can select and expand the **Create transcription** to see detailed input and output results.
147+
148+
## Next steps
149+
150+
- [Azure Cognitive Services for Batch Speech-to-text connector](/connectors/cognitiveservicesspe/)
151+
- [Azure Blob Storage connector](/connectors/azureblob/)
152+
- [Power Platform](/power-platform/)

articles/cognitive-services/Speech-Service/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ items:
382382
displayName: rest, swagger
383383
- name: Embedded Speech
384384
href: embedded-speech.md
385+
- name: Power automate batch transcription
386+
href: power-automate-batch-transcription.md
385387
- name: Speech containers
386388
items:
387389
- name: Cognitive Services containers documentation

0 commit comments

Comments
 (0)