ESP BASIC with php and js voice recognition
Posted: Sat Jan 14, 2017 7:51 pm
Hello,
https://youtu.be/AUpzyJm38o8
I am attaching a zip file with the php and javascript need to make this work. If you have a local php server just copy these files to convenient directory and navigate there in your web browser. It will ask you for permission to access your microphone.
You will have to modify the ip addresses in the msg url links in the php file to match the ip of your local esp device.
You can also add more commands pretty easy.
I am using the following code from the MSG URL (Advanced) demo on espbasic.com
https://www.esp8266basic.com/msg-url-advanced.html
https://youtu.be/AUpzyJm38o8
I am attaching a zip file with the php and javascript need to make this work. If you have a local php server just copy these files to convenient directory and navigate there in your web browser. It will ask you for permission to access your microphone.
You will have to modify the ip addresses in the msg url links in the php file to match the ip of your local esp device.
You can also add more commands pretty easy.
I am using the following code from the MSG URL (Advanced) demo on espbasic.com
https://www.esp8266basic.com/msg-url-advanced.html
Code: Select all
msgbranch [mybranch]
print "You can send msgs to the esp and do things based on accessing a URL"
wait
[mybranch]
MyReturnMsg = "Not a valid msg received"
pinNo = val(msgget("pin"))
pinStatus = val(msgget("stat"))
pinAction = msgget("action")
if pinAction == "po" then
io(po,pinNo,pinStatus)
MyReturnMsg = "good"
end if
if pinAction == "pi" then
MyReturnMsg = io(pi,pinNo)
end if
if pinAction == "pwo" then
io(pwo,pinNo,pinStatus)
MyReturnMsg = "good"
end if
if pinAction == "pwi" then
MyReturnMsg = io(pwi,pinNo)
end if
if pinAction == "ai" then
MyReturnMsg = io(ai)
end if
print "DOne with retrn code"
msgreturn MyReturnMsg
wait