She didn't need to stay silent, though.

Literal

Silence [object-を] keep need [topic-は] was-not [despite-のに].

~必要はなかった ('there was no need to') is the past negative of ~必要がある. The sentence-final のに ('even though / despite / and yet') adds regret or reproach — the speaker feels she kept silent unnecessarily. This trailing のに is very expressive in Japanese: it leaves the consequence unstated, inviting the listener to fill in 'but she did anyway.'