0
Answered

vh_audioProgress callback

JNJ 8 years ago updated by Gil Sideman 8 years ago 2

Is it possible for this callback to be called more frequently than one second? For short sentences or phrases, the callback may never be called?

Under review

Hi JNJ -

At the moment the shortest inteval is 1 sec.

I'd like to suggest for these very short audios to implement using a heuristic approach. Meaning - don't rely on our callback but implement progress based on your expected speech rate, starting at audioStarted.

While I would not suggest doing so for lengthy audios - this should work well enough for very short audios.


Also -

I saw earlier that you posted this query in a different thread - but for some reason I am unable to locate it. So I will respond here -


JNJ: Are vh_talkStarted and vh_talkEnded ALWAYS called? I am testing some code and there are instances where these callbacks do not get called at all. The code produces no errors. What might cause these functions to not be called?

GS: They should always be called when an audio sequence begins and ends.

There is another pair of call backs that is always called for each audio in the sequence, and those are vh_audioStarted and vh_audioEnded.

So the callbacks should frame the audios as in the following example -

> vh_talkStarted

>vh_audioStarted

1st audio plays

>vh_audioEnded

>vh_audioStarted

2nd audio plays

>vh_audioEnded

> vh_talkEnded


If you have encountered a case where the callbacks are not called as expected, please send us a note to support & we will look into it.

Thanx!