Why TTS Cannot Identify the Date Format?
Description
During dialog identification in Spanish, the text to speech (TTS) plays a character string in YYYYMMDD format (for example, 20190801) as a number instead of as the year, month, and date. This affects the customer experience. Therefore, measures must be taken so that a character string in YYYYMMDD format is played as expected.
Analysis
It is found that the obtained ODFS system date SYS.systemDate and the obtained TUC slot date entity value are both in YYYYMMDD format. They do not support automatic format conversion. Therefore, engineers preliminarily suspect that the TTS system used onsite has a specific requirement on the date format.
According to the interconnection commissioning of the TTS provided by the site, a date string in YYYY/MM/DD format (2019/08/01) can be played as expected. Therefore, the data format needs to be converted before the voice is played to resolve the problem.
Solution
Add a Business interface invoke diagram element next to the Semantic recognition diagram element, and convert the format of the slot variable value in the Semantic recognition diagram element by using the Java string processing function substring().
Specific parameter value:
TOC.ChatBotMonth.substring(0,4)+"/"+TOC.ChatBotMonth.substring(4,6)+"/"+TOC.ChatBotMonth.substring(6,8)+ " a "+TOC.ChatBotMonth.substring(9,13)+"/"+TOC.ChatBotMonth.substring(13,15)+"/"+TOC.ChatBotMonth.substring(15,17)
Month: slot variable name obtained when the semantic identification diagram element is executed. In the system, it is represented by TOC.ChatBotMonth.
For details about how to use slot variables, see Parameters.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot