Play secure audio file from Copilot Studio
Applies to: Dynamics 365 Customer Service
Important
Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.
Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.
For customer voice solutions, if the organization wants to play their custom audio clips that they play through their Interactive Voice Response (IVR), they must use secure storage.
Note
This article refers to Copilot Studio classic for voice support.
This can be achieved with Azure Blob Storage but by default, Azure Blob storage URLs contain values that are filtered out by security scanning code when passed between systems.
Prerequisites
- Have a custom Copilot Studio classic Bot, such as Sample Copilot Studio classic Bot solution
- Create Azure Storage Account
- Have a custom audio clip
- Find documentation on how to install Bot Framework Composer
Solution
- Utilize Azure Blob storage to host audio files for playback through SSML
- Encode the URLs such that they meet content security scan requirements for Microsoft systems.
Steps to Create Storage Account and secure audio file:
Sign in to your Azure account (sign-up link)
Create an Azure Storage account
When provisioning:
- uncheck the box for Allow enabling public access on individual containers to ensure only URLs with secure access tokens are allowed
- Leave the Enable public access from all networks selected
Once created, create a blob storage container under Containers
Upload audio files as blobs to the container
Double click on an uploaded audio file row in container view, and navigate to Generate SAS
Set an expiration time, and then choose Generate SAS token and URL.
Copy the Blob SAS URL
Before pasting into Copilot Studio, one more step is needed which is to encode the URL. Replace all
&
characters with&
to make it safe to pass through the Copilot Studio system.
Tip
The expiration time will determine when the system will stop being able to play back this audio file; please be careful when choosing this datetime.
Steps to use audio file from secure storage:
Open your custom Copilot Studio in Bot Framework composer.
Open your Bot in Copilot Studio.
Go to Topics, New topic and finally Open in Bot Framework Composer.
- Once Bot Framework Composer is open, add a new dialog to your Bot.
- With the new dialog created, choose BeginDialog.
- In the edit panel, add a new event Send a response.
Add speech component to your bot response. Learn more at Add speech components to your bot responses.
After choosing audio option, copy/past your secure URL generated above to the "URL" tag.
- Finally save and publish your Copilot Studio classic bot.