is there any reliable and consistent method to detect a pause of more than 2 seconds in realtime transcript.
currently my implementation is this.
if(currentFinalTranscript.audio_start - previousFinalTranscript.audio_end >= 2000){
console.log("pause greater than 2 seconds detected");
}
this works well when the pause duration is 5000 instead of 2000.
but the more near i go to 2000 it starts getting unreliable.
i am assuming that the audio_start and audio_end in the realtimeTranscript response excludes the milliseconds where the person was silent.
as this seems to be the case when the pause is longer.
currentFinalTranscript is the finalTranscript recieved in the new socket.onMessage callback
previousFinalTranscript is the finalTranscript recieved in the preceeding socket.onMessage callback
other logical approaches or flaws in the current logic are welcomed.
is there any reliable and consistent method to detect a pause of more than 2 seconds in realtime transcript.
currently my implementation is this.
this works well when the pause duration is
5000instead of2000.but the more near i go to
2000it starts getting unreliable.i am assuming that the
audio_startandaudio_endin the realtimeTranscript response excludes the milliseconds where the person was silent.as this seems to be the case when the pause is longer.
other logical approaches or flaws in the current logic are welcomed.