mic8310 Posted July 26, 2019 Share Posted July 26, 2019 Hi Id like to create a little stopwatch program. A start button will activate the stopwatch, a sound above a set decibel level (external microphone) will capture laptimes when the sound hits the required db level and log the data, this all needs to be live. Is this possible to do using php and if so, can anyone point me in the right direction for the sound part please! lots of codes for stopwatches but the sound activation I cannot seem to find any info on. Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/309024-clockwatch-sound-activated-using-php/ Share on other sites More sharing options...
kicken Posted July 26, 2019 Share Posted July 26, 2019 It's unclear to me what exactly your goal is, but most likely the answer is no. PHP doesn't really have the ability to play sounds or listen for sounds. Try and clarify what your end goal is and maybe some better help could be provided. For example, are you talking making a web page with a stop watch, or some CLI script? 1 Quote Link to comment https://forums.phpfreaks.com/topic/309024-clockwatch-sound-activated-using-php/#findComment-1568696 Share on other sites More sharing options...
taquitosensei Posted July 26, 2019 Share Posted July 26, 2019 You would need to involve javascript. You could do this almost all in javascript then do an ajax call to send the data to php. Here's a guide that shows how to listen for sound and make a reactive page. It should give you an idea of how to start. https://hackernoon.com/creative-coding-using-the-microphone-to-make-sound-reactive-art-part1-164fd3d972f3 1 Quote Link to comment https://forums.phpfreaks.com/topic/309024-clockwatch-sound-activated-using-php/#findComment-1568716 Share on other sites More sharing options...
mic8310 Posted July 27, 2019 Author Share Posted July 27, 2019 Thanks just looking to make a sound activated stopwatch rather than press a button Will have a look at the java stuff, never dabbled with it before Quote Link to comment https://forums.phpfreaks.com/topic/309024-clockwatch-sound-activated-using-php/#findComment-1568726 Share on other sites More sharing options...
mic8310 Posted July 27, 2019 Author Share Posted July 27, 2019 Webpage with a stopwatch would be fantastic Quote Link to comment https://forums.phpfreaks.com/topic/309024-clockwatch-sound-activated-using-php/#findComment-1568727 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.