There is audio software out there that can 'listen' to music are attempt to analyse tempo, meter etc. How well it does this depends on how much you pay, no doubt, as well as the type of music.
The short answer to your question is to do it yourself by careful listening. Building the skills for this takes time and musicians usually do this sort of thing right from the word go, it's part of music exams and a good teacher will build it into their teaching, even if exams are not the student's goal. Nothing beats the #1 ear and brain combination.