How can I use AzureTextToSpeech in PowerApps?

Joël Simons 0 Reputation points
2024-04-29T12:23:43.5733333+00:00

I selected the connector and put a button on the canvas.

On the OnSelect method I placed following code

Set( _myOutput, AzureTexttospeech.ConvertTextToSpeech("en-US-JennyNeural", 'AddressInput.Language'.'en-US', TextOut.Text));

The ConverTextToSpeech method returns a boolean (in my case True).

Where can I find the audio fragment to set on my Audio object?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,431 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 17,385 Reputation points Microsoft Employee
    2024-04-30T03:50:30.4533333+00:00

    @Joël Simons Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    The audio fragment generated by the Azure Text to Speech service is typically returned as a URL to an audio file. This URL can then be used to set the source of your Audio object in PowerApps.

    The AzureTexttospeech.ConvertTextToSpeech method in PowerApps doesn’t directly provide the audio data. You would need to use Power Automate to call the Azure Speech Service and return the audio data.

    How to call the Text-to-Speech and Audio Playback in Power Apps using Azure and Power Automate is explained here. Please follow this and let me know if you encounter any issues.

    More info about Azure Text to speech (Preview) .

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    0 comments No comments