Hello, thanks for reaching out to us, could you please check below steps to see if that helps?
Please Verify Audio Output Environment
- Canvas App Environment: Ensure that the Canvas app environment supports audio playback and that there are no restrictions or limitations on audio output.
- Speaker/Headphones: Make sure that your device's audio output (speakers or headphones) is configured correctly and working for other applications.
Also Check Permissions and Network Restrictions
- Ensure that there are no network restrictions or firewalls blocking outbound traffic from the Canvas app that might affect the SpeechSDK's ability to fetch or play audio.
Some Debugging Steps FYI
- Console Logs: Use browser developer tools (F12 in most browsers) to inspect console logs from your PowerApps control. Ensure that there are no errors related to audio initialization or playback.
- Player Initialization: Confirm that the
player
object fromSpeechSDK.SpeakerAudioDestination()
is correctly initialized and that there are no errors logged during its creation.
Environment and Contextual Considerations
- PCF Control Lifecycle: Understand the lifecycle of your PCF control within the Canvas app. Ensure that audio synthesis is triggered at an appropriate lifecycle stage where audio playback is supported.
- Asynchronous Operations: Ensure that asynchronous operations like audio synthesis and playback are handled correctly within the PCF control without relying on blocking operations that may not be supported in the Canvas app context.
I hope this helps, please let us know if you need more information.
Regards,
Yutong
-Please kindly accept the answer if you feel helpful to support the community, thanks.