Speech-based Interactive Location Guide for Liivi 2
Knowledge base For getting information into the program we created a couple of text files: PersonRoom.txt which contains information with persons name and their room number and RoomLocation.txt which contains information with the room number and short information about how to get into that room. We also use the third file RegularExpression.txt, which will be generated by program. This file contains information with persons name and a regular expression about how to ascertain that it is the right person.
Program Program checks if file RegularExpression.txt exists, if not it creates it. For creating it, it uses information from file PersonRoom.txt, mainly the information about names. If RegularExpression.txt exists then checks if it is up to date, if not then updates it. If yes then it sets up the pyttsx engine and reads in the files with knowledge. After that it generates a Tkinter window and starts waiting for the user input. Program sets up the pyttsx engine, reads in the text file about knowledge and generates a Tkinter window. After that it will be waiting for the users text input. After getting an input it starts checking if the input matches to any of the regular expressions about persons given in file. If no match was found it calculates all Levenshtein distances from all ordered word pairs given in input to all person names given in PersonRoom.txt file. It finds smallest distance and selects the person who had the smallest distance with two words in input and in that case the program says: “Could not find person with this name.” But maybe you are looking for and adds name what has closest distance. Same information is also shown on the Tkinter window as well. Then program moves to the second state in which it first recognizes if the user confirms that it is correct person. If not then it starts looking again. If it is confirmed then the program generates the route to the room using the knowledge from the text files and gives the route as a speech input and also as a text input to Tkinter window. If the input string matches to a regular expression then it generates the route to the room using the knowledge from the text file and gives the route as a speech input and also as a text input to Tkinter window. Estonian language has particular sounds, corresponding to the letters “Ü”, “Õ”, “Ö” and “Ä” which are not found in English. Before checking if the input string matches to a regular expression, the Unicode characters are replaced by the ASCII code characters, and thus we have replacements “Ü” -> “Y”, “Ö” and “Õ” -> “O” as well as “Ä” -> “A”. The same replacements occur with pronunciation when giving a speech output from program.