Also, depending on the track used, there may be trains passing by without braking, so you will need at least a classifier to sort these two cases.
I'd argue that using ML to build such a classifier is almost always a time saver.
And if you have the ML pipeline there, why not try to train it to recognize the speed while we are at it? It will likely find out about doppler shift but also do things that would take ages to code manually:
- Use volume levels and volume level differences - Use the clicks at rails junctions to evaluate the speed - Recognize the intensity of the braking/engine running - Use cues like rails vibration at certain speed - Adjust for air pressure difference when it hears the rain
All of that for free. Nowadays, going ML first is becoming a pretty good idea actually.