Editar

Compartilhar via


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 you want to play a custom audio clip through Interactive Voice Response (IVR), then you must use secure storage.

To add a custom audio clip to your enhanced voice bot, perform the following steps.

Prerequisites

Upload audio files in Azure Blob Storage

In the Azure portal, perform the following steps:

  1. Enable static website hosting. Learn more in Enable static website hosting. Make sure that the Primary endpoint is set to the URL of your website.
  2. Navigate to Data Storage > Containers.
  3. Select $web and upload your audio files.
  4. To secure the storage folder, perform the following steps:
    • Assign a Storage Blob Data Reader role to Copilot Studio app registration or the specific user/group that needs access. Learn more in Assign a storage blob data role.
    • Navigate to the container where you uploaded the file, select the required audio file, and then select Shared access tokens. Specify the required permissions, start, and expiry dates.

    Tip

    The audio file doesn't play after the expiry date. Make sure to specify this date accordingly.

    • Select Generate SAS token and URL. Copy the value in BLOB SAS URL.

Add the URL to the bot

Navigate to Copilot Studio and perform the following steps:

  1. Select the voice bot to which you want to add the audio file as a latency message.
  2. Add a latency message for long running operations.
  3. In the message box, specify the SSML tag, <audio src=""/>, and paste the BLOB SAS URL you copied from the Azure portal as the value of the src attribute. For example, <audio src="https://<storageaccount>.blob.core.windows.net/$web/<audiofile>?<SAS token>"/>. Learn more in Format speech synthesis with SSML.
  4. Save and publish the bot.