this is for texture baking too so specularity probably can’t be involved.
Add an image node in the compositor, load an image into it, add a filter node and play with the different filter types. Most types other than soften and sharpen will give you crazy edge effects. Pipe the result (when you have something you like) through a Set Alpha node and reduce tha alpha value or possibly run the result through a keying node if you need transparency.
What Rambo said, especially the Kirsch filter
ok, I guess it’s also somehow possible just to tune AO, so that the edges are real bright, but last time I tried AO didn’t worl=k with the ramp settings.