I made the trip from Barcelona to Toulouse via La Tour de Carol by train some 25 years ago (or was it more like 30) and I am considering a repeat performance this summer.
Slow train, great scenery (across the Pyrenees mountains), small price.
Trip takes around 6 hours.
Some might want to stop in Ribes de Freser for a ride through Vall de Nuria aboard the rack railway that goes all the way to Nuria.
On practical note, on Spanish side, the Renfe line starts in L' Hospitalet de Llobregat and runs to La Tor de Querol (Catalan names) via Vic and Ripoll. Puigcerda being the last stop in Spain before reaching La Tour de Carol.
At times, trip from La Tour de Carol to Toulouse requires change in Ax'les-Thermes with first leg by bus.
Make sure to take a picnic basket with food and drinks with you as there will be few occasions to purchase some along the way.
(* Current image of Rack Railway from Vall de Nuria site)