How to write query in using input voice data to comapre with data in database

Hello guys, this is my project "Voice Activated Entrance System"

USER database

HISTORY database

[{"id":"ee60c3e3.69e03","type":"mysql","z":"98f4cc17.965b","mydb":"7c738c44.e9a364","name":"DB_MYSQL","x":670,"y":260,"wires":[[]]},{"id":"5d766314.29f91c","type":"function","z":"98f4cc17.965b","name":"Verify Speech","func":"msg.topic = \"SELECT VOICE FROM USER\";\nreturn msg;","outputs":2,"noerr":0,"x":420,"y":320,"wires":[["ee60c3e3.69e03","5c178158.4733f"],["91d9fd2a.af375"]]},{"id":"2b9d8dd1.390142","type":"watson-speech-to-text","z":"98f4cc17.965b","name":"","alternatives":1,"speakerlabels":true,"smartformatting":false,"lang":"en-US","langhidden":"en-US","langcustom":"NoCustomisationSetting","langcustomhidden":"","custom-weight":"0.5","band":"NarrowbandModel","bandhidden":"NarrowbandModel","keywords":"","keywords-threshold":"0.5","word-confidence":false,"password":"","apikey":"aEfplzvlM_B8MA01nsDy3fj6b3CnG6dOQEGISr2gHxxk","payload-response":true,"streaming-mode":false,"streaming-mute":false,"auto-connect":false,"discard-listening":false,"disable-precheck":false,"service-endpoint":"https://api.us-south.speech-to-text.watson.cloud.ibm.com/instances/4ec7115d-1cbf-4ac7-b141-9c9a675fbdac","x":160,"y":320,"wires":[["338d77fb.3e9f88","5d766314.29f91c"]]},{"id":"9c343afa.80e438","type":"microphone","z":"98f4cc17.965b","name":"","x":110,"y":240,"wires":[["2b9d8dd1.390142"]]},{"id":"338d77fb.3e9f88","type":"debug","z":"98f4cc17.965b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"transcription","targetType":"msg","x":410,"y":380,"wires":[]},{"id":"595861ce.b689c","type":"play audio","z":"98f4cc17.965b","name":"Access Denied","voice":"0","x":880,"y":400,"wires":[]},{"id":"d44f4fcb.4f531","type":"play audio","z":"98f4cc17.965b","name":"Welcome","voice":"0","x":880,"y":320,"wires":[]},{"id":"67ca3d11.6eb434","type":"comment","z":"98f4cc17.965b","name":"","info":"Verify the speech from microphone are same with “VOICE” in User table or not.\n\nIf same, then upload that particular user's name to HISTORY table and with the output sound \"Welcome\".\n\nIf not same just output sound \"Access denied\".","x":400,"y":280,"wires":[]},{"id":"4944a410.7d505c","type":"comment","z":"98f4cc17.965b","name":"","info":"To see the speech from microphone to let us can check the speech is from microphone is what we want speech.","x":420,"y":420,"wires":[]},{"id":"91d9fd2a.af375","type":"watson-text-to-speech","z":"98f4cc17.965b","name":"","lang":"en-GB","langhidden":"en-GB","langcustom":"NoCustomisationSetting","langcustomhidden":"","voice":"en-GB_KateV3Voice","voicehidden":"","format":"audio/wav","password":"","apikey":"kxIPJUsW_2zjWfDnhr8yNS4oPK5BPM4ywQGbZcQL9ZLl","payload-response":false,"service-endpoint":"https://api.us-south.text-to-speech.watson.cloud.ibm.com/instances/2ead23d4-2528-416d-8e53-c40a658d6bfd","x":680,"y":400,"wires":[["595861ce.b689c"]]},{"id":"5c178158.4733f","type":"watson-text-to-speech","z":"98f4cc17.965b","name":"","lang":"en-GB","langhidden":"en-GB","langcustom":"NoCustomisationSetting","langcustomhidden":"","voice":"en-GB_KateV3Voice","voicehidden":"","format":"audio/wav","password":"","apikey":"kxIPJUsW_2zjWfDnhr8yNS4oPK5BPM4ywQGbZcQL9ZLl","payload-response":false,"service-endpoint":"https://api.us-south.text-to-speech.watson.cloud.ibm.com/instances/2ead23d4-2528-416d-8e53-c40a658d6bfd","x":680,"y":320,"wires":[["d44f4fcb.4f531"]]},{"id":"7c738c44.e9a364","type":"MySQLdatabase","z":"","host":"165.22.51.44","port":"3306","db":"hireelec_vaes","tz":""}]

Above is my flow and database.

I want :

  1. Verify the speech from microphone are same with “VOICE” in User table or not.

  2. If same, then upload that particular user's name from USER database to HISTORY database table and with the output sound "Welcome".

  3. If not same just output sound "Access denied".

But I dont have any idea for write sql code in Verify Speech node and confuse the flows and node I using is correct or not.....

Can everyone help me? or idea or similar project? Thank you

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.