+ {transcription}
+
+ {tList.length}
+
+ {tList
+ .reduce((acc, item) => {
+ if (acc.length === 0) {
+ acc.push(item)
+ console.log('### first')
+ return acc
+ }
+ // перезависыавем последний елемент
+ // case 1: пришел AddPartialTranscript
+ // case 2: пришел AddTranscript
+ if (
+ acc[acc.length - 1].metadata.start_time ===
+ item.metadata.start_time
+ ) {
+ console.log('### push next')
+
+ acc[acc.length - 1] = item
+
+ return acc
+ }
+
+ acc.push(item)
+
+ return acc
+ }, [])
+ .map((item: any, index: number) => {
+ console.log('### item', item)
+ const key = `${index}${item.metadata.start_time}${item.metadata.end_time}`
+ const temp = item.message === 'AddPartialTranscript'
+
+ return (
+
+ {item.metadata.transcript}
+
+ )
+ })}
+
+
+