I have had 2 dogs that do that. My GSD (rip) and my rescued boston/pit Libby.
Both of them high energy/high strung dogs... and they did it in situations where they wanted something or wanted to do something that they had to restrain themselves from. (Libby? Self control?
Libby also does it to sour or tart foods she likes (like grapejuice or lick of a Jolly Rancher) But she has a small cleft that I think effects her taste and smell (possibly for the better... I am observing this possibility, but its hard to tell).
Here is a picture of her smiling. You can see her harelip. Imagine those chops chattering. It doesnt make a noise, but its really cute!