When I do the music, I make the musicians listen to what's happening in the film. That way they treat the dialogue as if it was a singer.
I'm not a fast, stream-of-consciousness lyricist at all - I know some guys who are, and if there is one skill I wish I had, it's that.