This is Wild Magic, the first book in the Immortals Quartet by Tamora Pierce (part of her Tortall series).
Young Daine's knack with animals gets her a job helping the royal
horse mistress drive a herd of ponies to Tortall. It soon becomes
clear that Daine's talent, despite her struggles to hide it, is
downright magical. Horses and other animals not only obey the
mysterious girl, they come to her and seem to listen to her words. But
Daine will have to trust humans before she can come to terms with her
powers, her past and herself.
There are griffins, dragons, and various other mythological creatures. In the first book they head towards two castles--the royal palace in Corus, and Pirate's Swoop, which is a seaside estate that the finale chapters take place in.
Daine tries to talk/listen to the dolphins far out in the sea. It...doesn't work.
Daine grabbed her hand. “You're the purple fire. You brought me back?”
“I gave you a direct jolt to the heart. We thought we'd lost you."
“My heart?” She frowned, remembering. “It made too much noise. I
wanted it to quiet down so I could talk with the dolphins.”
“Do you hear her?” Numair asked the clouds. "She wanted to talk to
dolphins, so she stopped her own blessed heart! Mithros, Mynoss, and
Daine sat up. “I never.”
Numair opened his mouth and Onua, behind him, covered it. “Not until
you can talk without screaming," she said firmly.
"Daine, meditation is done for control over body responses, and thus
over mind.” Alanna's purple eyes were amused, but serious as well. “In
cutting back the sound of your heart, you were cutting the heartbeat