Dialogflow email address from speech

a 夏天 提交于 2021-01-29 14:20:42

问题


Does anyone have any suggestions for obtaining a user’s email address through speech? Written is quite straight forward as email addresses follow a pattern to some degree, but using speech is quite difficult. Is it best to simply ask the user to read out the characters one by one?


回答1:


Dialogflow provides System entites for most common user inputs. You can use sys.email entity for your purpose and then use it in your fulfillment.

Getting the above email address in your webhook fulfillment :

app.intent('getEmail', (conv, params) => {

  const userMail = params.email;
// remember to use the same variable name that you defined as
// Parameter name in your intent to access in params

 });

Just make sure to manually select the email address in training phrases if dialogflow does not automatically detect it. Refer this for more assistance.

Hope that helps!



来源:https://stackoverflow.com/questions/53530274/dialogflow-email-address-from-speech

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