ApiApp().GetApproximateSpeechLength

Measures the length of time to read a block of text at a given rate, returns an approximate float value in seconds. Audio-independent function.

Description

This method estimates how long a given block of text would take to read or perform. Useful for timing performances and other timings whether or not there is audio.

Example Usage (C#)


//Estimating Speech Time for a string of Text.

public bool Invoke(){
string text = “This is an example sentence to measure.”
float estimatedTime = _core.ApiApp().GetApproximateSpeechLength(text); return true;
}

Parameters

string

speechText

The text upon which to base the time estimate.

float

rate

The rate of speech, centered around a “normal” value of 1.0f. Defaults to 1.2f to account for average rate if unsupplied.

float

wordsPerMinute

The words per minute to use in estimating the speech time. Defaults to 200f if unsupplied.

float

timeFactor

Time Factor to apply if further scaling is required. Defaults to 1.0f if unsupplied.

Returns

A float representing the estimated time to speak or perform through the given text.