onTranscribedEvent method

void onTranscribedEvent(
  1. String speakerId,
  2. String text,
  3. String offset,
  4. String duration,
)

Implementation

void onTranscribedEvent(String speakerId,String text,String offset,String duration) {
  var date = DateTime.now();
  var startTime = int.parse(offset) ;
  var endTime = startTime + int.parse(duration) ;
  newText = true;
  if(!autoTranslate){
    azureSttCallback.onTranscribedEvent(speakerId,text,"",-1,false,startTime,endTime,date.millisecondsSinceEpoch);
  }
  else{
    transcribingChannelQueue.clear();
    transcribedChannelQueue.add(TranscribObject(text, speakerId,startTime, endTime));
  }
}