Company may succeed in getting the amount mentioned in service agreement/bond to the tune of amount company has spent on that type of training for you, which added to your qualification or specialized skill.
The training provided to better your performance or on product knowledge, system etc is not the training for which company may succeed.
You have to serve the notice which has been accepted by you in your appointment letter/contract. If the notice period is same for employee and employer , it is valid or it may be unethical and may not stand test of law. Notice period is well described in enactments e.g. Industrial Employment Standing Orders, SE act and is applicable as per descripttion of employees in these enactments. Contract should be fair and reference should be same for both the parties.Company should not resort to double standarads.
It is reiterated that you may record the threats (audio/visual) and these may come handy at appropriate time in appropriate forum.
If you are in software/IT Company then these companies do become cold and adamant as completion of projects is important. Many of these companies may not have good HR practices and well groomed and full fledge teams in HR.
It is important that you should structure your notice of resignation, representations in such a manner that virtually no room is left for the company to charge you on any count. It is true that if the project is 6 months long employee can not coerced and forced to remain in employment for 6 months. In your notice of resignation or by subsequent communications in writing you must write the effective date of resignation/last day in office and should tender reasonable notice and point out to designate an employee as replacement and for handing over the charge. You should also mention that only routine work may be assigned which can be completed within and up to effective date of resignation/last day in office.
You may show your documents including appointment letter, service agreement emails, etc to a competent and experienced service lawyer. Let your lawyer structure ansd draft your representations.