My goal is to calculate how long it takes to output text to audio when using the
say will speak in real time:
$ say -v Alex "Hello there"
I can then combine
time to answer the question in the text, although we have wait until the end of the actual audio output:
$ time say -v Alex "Hello there. How long will this take?" real 0m2.993s user 0m0.006s sys 0m0.009s
- Is there a way to calculate how long it will take to output any
saycommand without actually executing it? How?
- If not, how can I use
grepto pull out the real line?
I'm trying something like this:
time say -v Alex "Hello there. How long will this take?" | grep "^real .*$"
But of course there is no result.
Is the output not being passed to
grep not work for this multi-line output, or did I use the wrong pattern matching?
grep won't work, what will?
Actually what I think I'm really looking for is the duration of the generated audio file that results from