Is there a free speedometer app for Android phones which beeps if I am deviating from a pre-set speed?
The bike computer app I use will do almost all of this: IpBike. It's not free long-term, but you can try it for free for long enough to know whether you like it.  Its &quot;Workout&quot; mode allows you to set a target speed (or cadence, heart rate, power) specified as a range, and have feedback when you're out of range.  This could be as an interval in interval training, or could be for an arbitrarily long time.
I've never used it myself, so don't know what the feedback is like, but you can configure beeps and speech.  I'll have a play, and the author of the app has been known to visit here.
Edit after testing:
In the few minutes since I answered I configured a workout with a speed target of 21--27km/h for 8 repeats of 5 minutes after a 1-minute warmup, and went for a ride.  Below 21 km/h I got a falling tone every 10s (configurable) with an on-screen notification; above 27km/h I got a rising tone.  It lacks the more urgent tone for being further from the target that you'd like, but you can always glance at the speed.
I had text-to-speech disabled in IpBike (couldn't hear it well enough, and couldn't quite get the output I wanted), but testing at my desk in GPS-only mode, I get &quot;Below Target&quot;. You can use GPS or ANT+/Bluetooth sensors; it sounds like you'd use GPS as I do.