Is there any way to receive 'start time' of speech transcription?

Ryoko
Ryoko Member

Hello,

I am using Transcription Events of DailyJS for recording speech logs along with the video recording.

I would like to use speech logs to operate playback point of the recorded video.

In order to do this, I need to know 'start time' of speech but current transcription-message event returns only transcription finished timestamp.

Is there any way to receive 'starting time' of speech?

Answers

  • aconchillo
    aconchillo Dailynista
    edited March 17

    Hi @Ryoko . It's now possible to request Deepgram's raw responses by passing includeRawResponse: true (see https://docs.daily.co/reference/daily-js/instance-methods/start-transcription ). Then, every transcription message will include a rawResponse object with lots of details, for example, the duration of the transcript. With that, you should be able to get the exact start time. Something like:

    start_time = Date.parse(message.timestamp) - message.rawResponse.duration * 1000
    

    Let us know if this helps.

  • Ryoko
    Ryoko Member

    @aconchillo
    Thank you for your detailed explanation! This is exactly what I wanted to know. I will give it a try right away.