(r *proto.TranscriptLiveResponse)
| 278 | } |
| 279 | |
| 280 | func liveEventFromProto(r *proto.TranscriptLiveResponse) LiveTranscriptionEvent { |
| 281 | ev := LiveTranscriptionEvent{ |
| 282 | Delta: r.GetDelta(), |
| 283 | Eou: r.GetEou(), |
| 284 | Eob: r.GetEob(), |
| 285 | } |
| 286 | for _, w := range r.GetWords() { |
| 287 | ev.Words = append(ev.Words, schema.TranscriptionWord{ |
| 288 | Start: time.Duration(w.Start), |
| 289 | End: time.Duration(w.End), |
| 290 | Text: w.Text, |
| 291 | }) |
| 292 | } |
| 293 | if r.GetFinalResult() != nil { |
| 294 | ev.Final = transcriptResultFromProto(r.GetFinalResult()) |
| 295 | } |
| 296 | return ev |
| 297 | } |
no test coverage detected