No Company can force its employees to complete the notice period, it can only ask its employees to pay them for not serving only if the company has spent money on you. The company cannot hold you and they cannot come up with legal steps in terms of compensation. The company is entitled to get back only the amount that has been spent on you. It cannot demand excess amount from you.
Put in your resignation serving the specified days notice and be prepared to return all the company properties or assets that are in your custody at the end of this period. If the company refuses to accept your resignation in person/writing send it to the company via email at the same time. The company should be ready to adjust the leave against the notice period if you have earned leaves accumulated.
You will be given salary or final due for only such period which you have served as Notice period and not more than that. Try to solve the matter amicably, explain them your family situation and your financial situation. If they do not agree, file a case in the labour commission to receive your pending dues. Remember that the company can only recover the amount that they have spent on your training.
Reference: Labour Laws and Indian Contract Act,1872