The Diving Bell and the Butterfly is based upon the book Le Scaphandre Et Le Papillon by Jean-Dominique Bauby. Now remember that - "based upon" because for cinematic effect there are some personal relationships that were different from the book, and also (sadly) some people, including his girlfriend, were incorrectly portrayed and not nicely.
But look past this to the heart of the story. A man with "locked-in" syndrome after he suffers at stroke at 43 years old, is encouraged to learn to communicate and then writes a book. It is an amazing story and that part is true. I really enjoyed this film. Perhaps if you watch it, you may want to read the articles I have linked at the bottom afterwards, so it doesn't spoil your viewing. But remember not to judge the characters too harshly until you know the whole story. Alternately you may like to read the book. Either way, I hope you find it as inspiring as I did.
Here are the articles I mentioned earlier: