Real Time Factor (RTF)

1,632 views
Skip to first unread message

ang....@gmail.com

unread,
Jul 3, 2018, 8:23:19 PM7/3/18
to kaldi-help
How exactly is the RTF computed?

In our logs, for example, I find the following lines:
LOG (nnet-latgen-faster[5.4.163-04b1f]:main():nnet-latgen-faster.cc:181) Time taken 688.833s: real-time factor assuming 100 frames/sec is 0.420615
LOG (nnet-latgen-faster[5.4.163-04b1f]:main():nnet-latgen-faster.cc:184) Done 1000 utterances, failed for 0
LOG (nnet-latgen-faster[5.4.163-04b1f]:main():nnet-latgen-faster.cc:186) Overall log-likelihood per frame is 0.214349 over 163768 frames.
# Accounting: time=780 threads=1
# Ended (code 0) at Fri Jun 29 19:17:39 JST 2018, elapsed time 780 seconds

How do I analyze this result, or how do I compare to other RTFs whether the improvement in speed is substantial?  I've searched (i.e. googled) high and low for a standard RTF explanation but couldn't find any.

-Fred

ang....@gmail.com

unread,
Jul 3, 2018, 8:27:18 PM7/3/18
to kaldi-help
As an additional question: Let's say I did big n-gram rescoring to this system and found no RTF computation on the log except for the total time elapsed:
# Accounting: time=349 threads=1
# Ended (code 0) at Thu Jun 28 12:16:51 JST 2018, elapsed time 349 seconds

How do I incorporate this additional information to report on the increase in latency?

-Fred

Daniel Povey

unread,
Jul 3, 2018, 8:30:30 PM7/3/18
to kaldi-help
Real-time factor is the time taken, on average, to process a second of
speech data.
To convert the times-taken in the lattice rescoring, you'd have to
figure out how many seconds' worth of data you are processing and
relate that to the total time taken. You might be able to get the
number of frames from other log files when you processed that same
data.

Dan
> --
> Go to http://kaldi-asr.org/forums.html find out how to join
> ---
> You received this message because you are subscribed to the Google Groups
> "kaldi-help" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kaldi-help+...@googlegroups.com.
> To post to this group, send email to kaldi...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kaldi-help/8cdb53fb-dc1c-4e9b-b9b3-e6bc8842f7c7%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Daniel Povey

unread,
Jul 3, 2018, 8:45:36 PM7/3/18
to kaldi-help
there are 100 frames per second, normally.


On Tue, Jul 3, 2018 at 8:35 PM, <ang....@gmail.com> wrote:
> So I guess RTF = time taken / total number of frames.
> Am I right to assume that if I were to add the rescoring of 349 seconds, I
> simply add 349 / 163768 to the RTF?
>
> This will make it 0.42274606
>
> -Fred
>
> --
> Go to http://kaldi-asr.org/forums.html find out how to join
> ---
> You received this message because you are subscribed to the Google Groups
> "kaldi-help" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kaldi-help+...@googlegroups.com.
> To post to this group, send email to kaldi...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kaldi-help/c12ee1f5-9459-4350-acee-e9237ca7c4c7%40googlegroups.com.

ang....@gmail.com

unread,
Jul 3, 2018, 9:19:56 PM7/3/18
to kaldi-help
Is the 100 frames/second just an assumption from the decoder, or was it derived programatically?

As I am not the one who created the acoustic model for this system, do I need to look at the configuration to find out the actual frame counts per second to get a precise measure of the RTF?

I apologize for double postings as I don't know whether private replies are actually seen or how other people normally create follow up questions to make threads like in other posts.


-Fred

On Wednesday, July 4, 2018 at 9:23:19 AM UTC+9, ang....@gmail.com wrote:

Daniel Povey

unread,
Jul 3, 2018, 9:56:21 PM7/3/18
to kaldi-help
Unless the MFCC config (default: conf/mfcc.conf) or equivalent sets
the --frame-shift to a non-default value, it would be 100 frames per
second.
> --
> Go to http://kaldi-asr.org/forums.html find out how to join
> ---
> You received this message because you are subscribed to the Google Groups
> "kaldi-help" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kaldi-help+...@googlegroups.com.
> To post to this group, send email to kaldi...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kaldi-help/fbaa95d0-c8ec-4376-b8c7-93c22df8c29a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages