Factorio: How to play programmable speaker when train stopped?

That should work just fine. I've just made a test setup and it worked. Here's what I did:

  1. Created a train stop and placed a programmable speaker next to it
  2. Connected them with green wire
  3. Opened the settings of the station to specify 'Read stopped trains' and output to signal 'T'
  4. Opened the speaker and set it to go off when T > 0.

Now, my guess is that your speaker is checking for the input signal F == 1, but the train at the stop has its own unique number, so it's probably not 1. Try changing that to F > 0.

In images: Station setup

Station setup

Station configuration

Station configuration

Speaker configuration

Speaker configuration