Do phones not filter out/ignore any sound being emitted from the speaker? Seems like that shouldn't be too hard to do.
Since the output is known, similar input can then be stripped. This only works when both the output of the speaker and input of the microphone are known.
This can't be done to determine whether another speaker, such as a TV, generated the output.
Visual aid on echo cancellation: http://i.imgur.com/m2LSIz9.png
I'd guess most speaker generated audio would be from a compressed source. Audio compression generally cuts off frequencies that we can not hear. When we speak though, we must be generating a lot of inaudible frequencies. It could be determined by checking if those exist or not.
And further, the attack described is a sentence that doesn't sound to a human like "Ok Google" or "Hey Siri", or whatever