A typical creature that on its turn takes a swift action can't also on its turn take a immediate action and vice versa. A creature that takes on its turn either an immediate action or a swift action, however, can, after its turn ends, take an immediate action before the creature's next turn, but doing so costs the creature its swift action for its upcoming turn.
The 1st-level bard spell inspirational boost [ench] (Spell Compendium 124) says, "While this spell is in effect, the morale bonus granted by your inspire courage bardic music increases by 1," but then says, "If you don’t begin to use your inspire courage ability before the beginning of your next turn, the spell’s effect ends." To get the spell's benefits, it's mandatory to cast the spell before starting the bardic music effect inspire courage.
However, the badge of valor (Magic Item Compendium 208) (1,400 gp; 0 lbs.) says, in part, "If you have the bardic music ability to inspire courage, you can activate a badge of valor to increase the bonus granted by that ability by 1 for the duration of its effect." This means that the badge must be activated after an inspire courage effect has already been started, and, as activating the badge is an immediate action, that can be done off-turn during the initiative count right after the bard's turn.
Thus on the bard's turn she can take a swift action to cast the spell inspirational boost then take a standard action to start the inspire courage effect. After her turn ends, she can then take an immediate action to activate the badge of valor, foregoing her upcoming turn's swift action. In combination, this applies to the inspire courage effect both the spell's benefit and the item's benefit.