You can do this with OpenCV in one of several languages but OpenCV 3 has a demo in python called peopledetect.py which would probably be a very good starting point, there are also lots of demos of capturing from the web cam. You could have a modified version of that demo run once every 5 minutes and create a web page with a percentage chance that the room is unoccupied.
Note that the python People Detect demo is only 71 lines long and the python Face Detect which also might be a good starting point is only 73 lines - so you should find them easy to modify.
I would suggest that if the room matches lights off there is a 99% chance that it is unoccupied - someone might be asleep in there - put if people detect detects one or more person then, depending on the number of false positives, there is a near 0 chance that it is empty.
OpenCV is:
- Free, gratis and Open Source
- Cross Platform Windows, OS-X, Linux, iOS & Android
- Has bindings for C++, C, Python 2 & Java
- The python demos run from the command line and you can output the results to a file or to the command line
- Is well documented & comes with lots of demo files
If you also need to check for sound in the room there is also a python package called pyAudio with which it would be reasonably simple to record a few seconds of sound and there are lots of on-line examples for processing an audio file for peak detection if the empty room is normally very quiet or you could use frequency analysis to check for the human voice detection range. There is even a python Speech Recognition package that could be a good starting point.
Important Note
If you put something like this in place most countries will require you to have a clear sign on the door &/or in the room indicating that the room is monitored for activity with Video &/or Audio capture.