Handing down his judgement, Deputy District Judge Anthony Woodcock said of Mr Bray: "He admitted that he is 'anti-Tory', which is his words.
"He believes his is an important message to disseminate. He needs the volume that he uses the get the message across from Parliament Street to the Palace of Westminster."
The defendant, from Port Talbot, south Wales, looked up to the public gallery and was given a thumbs up by one of his supporters following the verdict.
Speaking outside the court after the verdict, Mr Bray said: "Today is a very important day, not just for us as protesters, but for everybody's freedom of expression.
"Whatever your protest is, this is a victory for you."
When asked whether he would continue to play music at protests outside Parliament, the activist said he planned to "carry on as we are".
Mr Bray is known for playing loud music at protests in Westminster, including D:Ream's Things Can Only Get Better at the gates of Downing Street when Sunak announced the general election in the pouring rain last May.
Police approached Mr Bray at about 11:20 on 20 March last year, minutes before Sunak arrived ahead of Prime Minister's Questions.
Mr Bray had been playing edits of the Muppets and Darth Vader themes on his speakers.
The songs were used "as the prime minister came in, which is what we always did for Rishi - apparently he's a Star Wars fan", the activist told the court.
Officers handed him a map and a notice that warned him he was prohibited from playing the speakers in the controlled area under a by-law, the court heard.
The court heard the music resumed intermittently and shortly after 12:33, officers seized the speakers.