The AUM87 tutorial contains a SpeechRecognition script file.
I want to add a comparison to the speech recognition code. When I add something simple like (screen_color.blue = 100), see below, the code will run successfully.
if((listeningresult == 0) && (screen_color.blue = 100)) {
str_cpy((status_text.pstring)[0],"ready");
get_last_sentence(mysentence);
str_cpy((test_text.pstring)[0],mysentence);
listeningresult = 1;
However when I try other more complex comparisons I don’t seem to be able to get them to work and wondered what I am doing wrong? For example, when I write the speech that appears on the screen to a txt file and then try and run the comparison below I get‘Error E355’.
if((listeningresult == 0) && (file_asc_write (filehandle, 13) > 1) {
str_cpy((status_text.pstring)[0],"ready");
get_last_sentence(mysentence);
str_cpy((test_text.pstring)[0],mysentence);
listeningresult = 1;
Alternatively, when I try the following I get ‘Script Editor is not working’.
if((listeningresult == 0) && (file_length (filehandle) <= 1)) {
str_cpy((status_text.pstring)[0],"ready");
get_last_sentence(mysentence);
str_cpy((test_text.pstring)[0],mysentence);
listeningresult = 1;
Any help will be greatfully appreciated.