Revving idle

I have a 92 Camry with 132000 miles on it. It recently started a revving action while in idle or braking. It acts like it wants to die and then will weakly rev back up only to immediately act like it wants to die. Sometimes when you manually rev it the engine chokes out but will restart. Any suggestion?

Have the engine inspected for a vacuum leak.

Tester