@storyteller-platform/align 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,7 +111,17 @@ async function align(input, output, transcriptionsDir, audiobookDir, options) {
111
111
  (contents) => contents.map(
112
112
  (c) => JSON.parse(c)
113
113
  )
114
- );
114
+ ).then((transcriptions2) => {
115
+ return transcriptions2.map((transcription) => {
116
+ if ("wordTimeline" in transcription) {
117
+ return {
118
+ ...transcription,
119
+ timeline: transcription.wordTimeline
120
+ };
121
+ }
122
+ return transcription;
123
+ });
124
+ });
115
125
  const aligner = new Aligner(
116
126
  epub,
117
127
  audiobookFiles,
@@ -45,7 +45,17 @@ async function align(input, output, transcriptionsDir, audiobookDir, options) {
45
45
  (contents) => contents.map(
46
46
  (c) => JSON.parse(c)
47
47
  )
48
- );
48
+ ).then((transcriptions2) => {
49
+ return transcriptions2.map((transcription) => {
50
+ if ("wordTimeline" in transcription) {
51
+ return {
52
+ ...transcription,
53
+ timeline: transcription.wordTimeline
54
+ };
55
+ }
56
+ return transcription;
57
+ });
58
+ });
49
59
  const aligner = new Aligner(
50
60
  epub,
51
61
  audiobookFiles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyteller-platform/align",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "A library and CLI for automatically aligning audiobooks and EPUBs to produce Media Overlays",
5
5
  "author": "Shane Friedman",
6
6
  "license": "MIT",