Real-time-factor: Difference between revisions
RTF definition |
typo on the word "length" |
||
| (One intermediate revision by one other user not shown) | |||
| Line 6: | Line 6: | ||
Usually a state of the art speech-to-text cloud-based service supplied by Google, Azure, AWS, etc. has values between 0.2 and 0.6. Note that is all very depending on many factors, the network/internet bandwith, the speech content, etc. In case of an on-prem ASR, the major impacting factor is the algorithm and the hardware resources (CPU/RAM). <syntaxhighlight lang="python"> | Usually a state of the art speech-to-text cloud-based service supplied by Google, Azure, AWS, etc. has values between 0.2 and 0.6. Note that is all very depending on many factors, the network/internet bandwith, the speech content, etc. In case of an on-prem ASR, the major impacting factor is the algorithm and the hardware resources (CPU/RAM). <syntaxhighlight lang="python"> | ||
def real_time_factor(processingTime, | def real_time_factor(processingTime, audioLength, decimals=2): | ||
''' Real-Time Factor (RTF) is defined as processing-time / length-of-audio. ''' | ''' Real-Time Factor (RTF) is defined as processing-time / length-of-audio. ''' | ||
rtf = (processingTime / | rtf = (processingTime / audioLength) | ||
return round(rtf, decimals) | return round(rtf, decimals) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:STT]] | |||
[[Category:TTS]] | |||