We have a web page ( [login to view URL] ) which Already have the following features
1)- It detects 'Mouse Inactivity' . If it doesn't detect Mouse Inactivity for "Time Interval" ( id="mousetime"). It shows "Popup". When it finds 'Mouse Move' then it disappear 'Popup', AND if Mouse in not moved even show the Popup for another 'Time Interval'(waitAfterPopUpOpened), then it play audio file. When it finds 'Mouse Move', then it disappear Popup and Audio file.
2)- Speech Detection : It send audio to Google and Google sends back 'Translated text' of that audio. This application then monitors 'Translated Text'. If it doesn't find 'Translated text' for 'Time Interval"(id="firstWaitInterval"), then it show 'Popup'. When it finds 'Translated text' then it disappear 'Popup'. AND if there is still no 'Translated text' after showing the Popup for another 'Time Interval'(waitAfterPopUpOpened), then it plays audio file. When it finds 'Translated text', then it Disappear Popup and Audio File.
Fixing/Updating:
1)- Currently, there is bug in the script. It doesn't throw Popups and play Audio files (for point 1 and point 2) according to the Time Interval we have set in the code. It's throws randomly, which needs to be fixed.
Note: it works on Chrome because speech recognition works on chrome only.