Can't you just cast spells during a conversation if it looks like a battle is about to start?

Theres a "change character" button on the lower left which lets you control characters who are not in dialogue.