i dont understand this method onEndOfSpeech()
for example:
we start at KWS_SEARCH than the user says ho mighy computer and the method is called right?
so now we are at MENU_SEARCH than the user say digits but now there is a problem
onEndOfSpeech() is need to be called now so the lines: if(!recognizer.getSearchName().equals(KWS_SEARCH))
switchSearch(KWS_SEARCH); are called but we are in MENU_SEARCH so switchSearch(KWS_SEARCH);
happen thats a problem becuase switchSearch calls recognizer.startListening(searchName) with KWS_SEARCH as searchName so by that logic we are supposed to return to the first menu(where we wait for ho mighty computer)
but instad we continue to DIGITS_SEARCH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i dont understand this method onEndOfSpeech()
for example:
we start at KWS_SEARCH than the user says ho mighy computer and the method is called right?
so now we are at MENU_SEARCH than the user say digits but now there is a problem
onEndOfSpeech() is need to be called now so the lines: if(!recognizer.getSearchName().equals(KWS_SEARCH))
switchSearch(KWS_SEARCH); are called but we are in MENU_SEARCH so switchSearch(KWS_SEARCH);
happen thats a problem becuase switchSearch calls recognizer.startListening(searchName) with KWS_SEARCH as searchName so by that logic we are supposed to return to the first menu(where we wait for ho mighty computer)
but instad we continue to DIGITS_SEARCH
switch to DIGITS_SEARCH happens in onPartialResult long before onEndOfSpeech is invoked.
ok thanks i think i understand now