- This topic has 2 replies, 2 voices, and was last updated 8 years, 5 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
› Forums › Basic skills › Programming › Shell scripting (in bash) › Timing a process
This is simple – just place time
before the program, command or shell script that you want to run:
$ time HERest .... real 4m3.111s user 3m34.005s sys 0m0.215s
The user
time is the quantity of interest – it’s the amount of time actual spent running the program. On a busy shared machine, this might be considerably less that the “wall clock” time reported as real
.
What if we want to time a process inside Festival, to time how long it takes to generate the utterances?
You can time Festival, just like any other program. But, to get meaningful results you may not want to run it in interactive mode. Create a script for Festival to execute (load your voice, synthesise a test set, exit) and time the execution of that:
$ time festival myscript.scm
where myscript.scm
might contain something like
(voice_localdir_multisyn-rpx) (SayText "My first sentence.") (SayText "My second sentence.") (SayText "...and so on...") (quit)
Make the test set large enough so that the time spent loading the voice is not a significant portion of the execution time.
You should probably disable audio output too, which can be done by changing the playback method to use a command, and setting that command to be empty – add these lines to the top of the script
(Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Command "")
Some forums are only available if you are logged in. Searching will only return results from those forums if you log in.
Copyright © 2024 · Balance Child Theme on Genesis Framework · WordPress · Log in