So do what i said...
MIC --> Speech to text --> Function node (as above - to generate a SQL with WHERE clause) --> done!
How it should work...
-
get MIC data
-
convert to text
-
generate a SQL statement (with a WHERE clause set to the converted text) and pass it out in
msg.topicto the DATABASE node
e.g.SELECT TOP 1 * from MY_TABLE WHERE VOICE = 'hello hello hello'" -
DATABASE node gets only 1 row - IF FOUND! (otherwise you get nothing back from the database meaning is WASNT FOUND)
This means there is NO NEED to search for text in node-red - SQL does that through the WHERE clause. Delete the JOIN node, and comparison methods - they are not necessary.
Do you understand?