How to enable speech function on Webchat channel in a modern SharePoint Online page?

前提是你 提交于 2019-12-02 16:40:22

问题


I made a chatbot that has speech capabilities, I tested in the emulator and it works great. However, after deployment, I noticed that the webchat channel doesn't have it enabled. I have the webchat embedded in a modern SharePoint Online site and from what I've searched in the Internet, most answers talk about modifying the HTML and using JavaScript, which apparently is not easy to do in this modern framework that Microsoft has according to articles.

So in the end, how can I enable the speech feature in the webchat channel that is embedded inside a modern SharePoint site page?


回答1:


I believe there are a couple things going on here. First, it is an issue with Cross Origin. I'll come back to that in a minute. Secondly, assuming you are using the Browser-provider speech service, that that means you are using Chrome (let me know if that is not the case). The microphone use in iframes was depricated for cross origin. You can change that by adding allow='microphone' attribute to your iframe tag. Please see more here.

I was able to get it working in a simple iframe, outside SPO and using Cross-Origin Resource Sharing. The unfortunate part is that you won't be able to add CORS to your SharePoint Online site for the embed web part.

You might look at using Bing or custom speech services. Otherwise, I think your options are limited to custom pages/parts/app/add-in for SharePoint (if even then).

Edit: Looks like Bing Speech is being deprecated.



来源:https://stackoverflow.com/questions/53453779/how-to-enable-speech-function-on-webchat-channel-in-a-modern-sharepoint-online-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!