How to output a voltage proportional to the speed of a DC motor?
You would use an analog tachometer. These devices are a precision (DC) dynamo whose output voltage is a linear function of speed.



Figure 1. An analog tachometer mounted on the rear of the motor.

You can also purchase separate tachometers which could be mounted somewhere else on the drive train.