No, playing music, shouting or generally being loud does not scare fish. That is because sound waves struggle to penetrate the water surface. There are exceptions, the vibrations from low frequency bass does travel further into the water and might have an influence.
“Be quiet, or you will scare the fish” is a commonly used phrase. I believe, it is mostly used to preserve the tranquillity of nature than any real concern of spooked fish. One of my most productive fishing spots is just upstream of a firing range, and there can be all sorts of loud bangs going off. During the harvest there is even gas canons booming away. Other than driving me slightly mad, none of those sounds had any influence on the fishing.
That is because sound does not readily travel between the air and water. An easy example, while swimming shout as loud as you can beneath the water. The people on the surface will struggle to hear a thing. Likewise, diving beneath the surface will dull out any surface sounds.
I will also note, there is plenty of natural sounds beneath the surface of a flowing river. There is water bubbling across rocks, stones slowly rolling downstream. Any spoken sound on the surface will easily be lost in the chaos.
Surface sounds might not spook trout, but it might spook animals nearby which will go on to spook fish.
While speaking loudly and shouting does not scare trout. It can scare nearby wildlife, whose panic might start a chain reaction which will eventually spook trout. Imagine a gulp of Cormorants or herons relaxing near the water edge. Shouting is enough to cause them to take flight, they then fly in all directions. Trout being natural prey for cormorants will likely spot the flight above and wishing not to be eaten they will leave their feeding lays and dive away to safety.
The less you can disturb the water surface the better. So why take the risk.
Sounds beneath the surface can spook trout
While sound struggles to past between air and water. If a sound occurs beneath the surface, or under it then it can travel fast. That is why throwing a rock into a pool can quickly cause all the fish to scatter. Likewise, dropping a pair of pliers on an aluminium hull is enough to scare any nearby trout.
Some sounds can attract trout
Not all sounds are negative, the splash of a dry fly can grab the attention of nearby fish. Likewise, the thumping vibration of an in-line spinner can drive trout crazy. Now, I can not strike whether they strike out of hunger or anger. There is even ball bearings inside some jerkbaits which supposedly create a trout attracting rattle.
Can boat engines spook trout?
Yes, the roar of a boat engine can scare trout. But, in my experience not for long. One time I was casting to raising trout on a large river. To ruin the moment a boat went zooming downstream right over the feeding fish. The trout vanished, so I decided to take a short break and change my tippet and fly. By the time I returned to the water edge the trout were feeding again. These trout hear boat engines quite frequently, so while they swim away in terror once the sound is gone they happily start to feed again.
It is also worth taking the engine sound into consideration when trolling. I like to troll in a lazy S pattern with my lures a good distance behind the boat. By trolling in the lazy S the lures cut the corners and will across water where my boat has not been. When targeting trout, I rarely troll in straight lines.
Now, there are some predatory fish which are attracted to the sound of a boat. They might even confuse them for a shoal of baitfish. For these species, a straight troll can be very effective.