pietrop / slate-transcript-editor

A React component to make correcting automated transcriptions of audio and video easier and faster. Using the SlateJs editor.
https://pietrop.github.io/slate-transcript-editor
Other
75 stars 33 forks source link

VTT speakers and paragraphs export broken #28

Closed pietrop closed 3 years ago

pietrop commented 3 years ago

Describe the bug

VTT speakers and paragraphs export broken

To Reproduce Steps to reproduce the behavior:

  1. Go to storybook http://localhost:6006
  2. Click on CC captions button
  3. Click on VTT with speakers and paragraphs
  4. See error

in console

index.js:35 Uncaught (in promise) TypeError: Cannot read property 'end' of undefined
    at index.js:35
    at Array.map (<anonymous>)
    at addTimecodesToLines (index.js:30)
    at preSegmentTextJson (index.js:88)
    at subtitlesComposer (index.js:92)
    at _callee6$ (index.js:457)
    at tryCatch (runtime.js:63)
    at Generator.invoke [as _invoke] (runtime.js:293)
    at Generator.next (runtime.js:118)
    at asyncGeneratorStep (4-Live.stories.js:111)

line 35 in addTimecodesToLines in /src/util/export-adapters/subtitles-generator/index.js#35

jsonLine.end = wordsList[endWordCounter - 1].end;

Expected behavior

To be able to export with VTT with speakers and paragraphs Additional context

NA

overZellis133 commented 3 years ago

@jshearer

jshearer commented 3 years ago

@pietrop this can be closed now right?

pietrop commented 3 years ago

yup, good catch, thanks