The investigators aim to verify whether using the DeCap) the investigators will be able to avoid at the end of the T-piece trial the criteria of failure. If so, the patient will be extubated and DeCap will be continued when all of the following were achieved for at least 12 hours: respiratory rate less than 25 breaths/min; pH greater than 7.35; Paco2 less than 20% of the baseline value; and absence of use of the accessory muscles or paradoxical abdominal movements.