Here's a tip/trick I used while writing Hallways in the Night (A novel for which I probably wrote close to 750,000 words as part of the process of getting to my 94,000 word final count.) For most of the time I was writing the book, I didn't see the blank screen in front of me or the words going onto the page. Most of the time, my vision was on the images and scenes that I was constructing in my head. For me, the keyboard and the screen were like the steering wheel in my car. Vital tools needed to get me where I wanted to go, but I was always focused on the road: What my characters were saying, what they were doing, how they might be feeling in a particular situation. None of which I could discern from a computer screen just like when I'm driving my car, I'll never get to where I need to go if I'm focused on the steering wheel.
When your writing, your hands and keyboard should be a simple extension of yourself. You need to get as far inside your mind as possible where you can take a seat and figure out what's going on. Be the Director, give your characters' instructions, but also let them freelance a little bit. Let them say different things, use different responses, see what feels natural and what does not.
When I was writing dialogue, there were times I came up with a dozen or more sentences before I was happy with what was being said. And that is what is so great about writing. In my real life, I unfortunately say a lot of stupid things or fail to say the right thing. As Charles Krauthammer once said, I often have the wit of the staircase meaning I figure out the perfect thing to say when the evening's over and I'm going up the stairs to retire for the evening. It's then I have the perfect response. Too late for me, but never too late for your characters. Thanks to the delete key and the fact that you are in complete control of the "time-space" continuum, your characters never have to deal with failing to say the right thing. You can always ensure they do.