I know Perl is no longer fashionable, but it’s still the simplest way to do this sort of ad hoc processing I think.
ping google.com | perl -ne '/time=(.*)/ && system("say", $1)'
Of course it’s only a little more awkward in Ruby: ping google.com | ruby -ne '$_ =~ /time=(.*)/ && system("say", $1)'
(No criticism is intended of your perfectly fine code. I enjoy comparing different ways to do things like this, and perhaps others do too.)