Cannot read properties of undefined
Summary
During the creation of a readaloud I get an error
Environment
{Detail the Storyteller environment used when the bug was encountered.}
- docker latest
- web
- Firefox, but irrelevant
- whisper-server
- model large-v3-turbo
Steps to reproduce
I have an mp3 version of "The Martian" book by Andy Weir. I tried to create a realoud.
Transcription fails with the following log
web-1 | [2026-01-25 11:43:33.027 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00002-00001.mp3
web-1 | [2026-01-25 11:44:36.612 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00003-00001.mp3
web-1 | [2026-01-25 11:45:39.965 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00004-00001.mp3
web-1 | [2026-01-25 11:46:36.411 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00005-00001.mp3
web-1 | [2026-01-25 11:47:43.731 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00006-00001.mp3
web-1 | [2026-01-25 11:49:10.963 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00007-00001.mp3
web-1 | [2026-01-25 11:50:49.016 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00008-00001.mp3
web-1 | [2026-01-25 11:52:15.767 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00009-00001.mp3
web-1 | [2026-01-25 11:53:19.535 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00010-00001.mp3
web-1 | [2026-01-25 11:54:14.291 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00011-00001.mp3
web-1 | [2026-01-25 11:56:24.069 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00012-00001.mp3
web-1 | [2026-01-25 11:57:45.648 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00013-00001.mp3
web-1 | [2026-01-25 11:58:55.335 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00014-00001.mp3
web-1 | [2026-01-25 12:00:29.785 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00015-00001.mp3
web-1 | [2026-01-25 12:02:33.205 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00016-00001.mp3
web-1 | [2026-01-25 12:05:04.324 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00017-00001.mp3
web-1 | [2026-01-25 12:06:29.333 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00018-00001.mp3
web-1 | [2026-01-25 12:08:02.592 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00019-00001.mp3
web-1 | [2026-01-25 12:09:18.996 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00020-00001.mp3
web-1 | [2026-01-25 12:10:43.008 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00021-00001.mp3
web-1 | [2026-01-25 12:12:24.927 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00022-00001.mp3
web-1 | [2026-01-25 12:13:53.073 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00023-00001.mp3
web-1 | [2026-01-25 12:15:17.173 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00024-00001.mp3
web-1 | [2026-01-25 12:16:47.110 +0000] INFO: Transcribing audio file /data/assets/The Martian- A Novel/transcoded audio/00025-00001.mp3
web-1 | [2026-01-25 12:18:24.111 +0000] ERROR: Failed to transcribe /data/assets/The Martian- A Novel/transcoded audio/00025-00001.mp3
web-1 | err: {
web-1 | "type": "TypeError",
web-1 | "message": "Cannot read properties of undefined (reading 'toLowerCase')",
web-1 | "stack":
web-1 | TypeError: Cannot read properties of undefined (reading 'toLowerCase')
web-1 | at getNormalizedFragmentsForSpeech (/app/.next/standalone/node_modules/echogarden/src/nlp/TextNormalizer.ts:96:55)
web-1 | at Object.preprocessAndSynthesize (/app/.next/standalone/node_modules/echogarden/src/synthesis/EspeakTTS.ts:61:54)
web-1 | at async synthesizeSegment (/app/.next/standalone/node_modules/echogarden/src/api/Synthesis.ts:567:62)
web-1 | at async synthesizeSegments (/app/.next/standalone/node_modules/echogarden/src/api/Synthesis.ts:166:79)
web-1 | at async createAlignmentReferenceUsingEspeak (/app/.next/standalone/node_modules/echogarden/src/alignment/SpeechAlignment.ts:670:6)
web-1 | at async align2 (/app/.next/standalone/node_modules/echogarden/src/api/Alignment.ts:215:8)
web-1 | at async alignSegments (/app/.next/standalone/node_modules/echogarden/src/api/Alignment.ts:371:44)
web-1 | at async Object.recognize8 (/app/.next/standalone/node_modules/echogarden/src/recognition/OpenAICloudSTT.ts:87:15)
web-1 | at async recognize7 (/app/.next/standalone/node_modules/echogarden/src/api/Recognition.ts:273:32)
web-1 | at async transcribeTrack (/app/.next/standalone/web/src/transcribe.ts:338:42)
web-1 | }
web-1 | [2026-01-25 12:18:24.339 +0000] ERROR: Encountered error while running task "TRANSCRIBE_CHAPTERS" for book c95852c3-ff76-4c2c-9b4d-37180f9ea009
web-1 | err: {
web-1 | "type": "TypeError",
web-1 | "message": "Cannot read properties of undefined (reading 'toLowerCase')",
web-1 | "stack":
web-1 | TypeError: Cannot read properties of undefined (reading 'toLowerCase')
web-1 | at getNormalizedFragmentsForSpeech (/app/.next/standalone/node_modules/echogarden/src/nlp/TextNormalizer.ts:96:55)
web-1 | at Object.preprocessAndSynthesize (/app/.next/standalone/node_modules/echogarden/src/synthesis/EspeakTTS.ts:61:54)
web-1 | at async synthesizeSegment (/app/.next/standalone/node_modules/echogarden/src/api/Synthesis.ts:567:62)
web-1 | at async synthesizeSegments (/app/.next/standalone/node_modules/echogarden/src/api/Synthesis.ts:166:79)
web-1 | at async createAlignmentReferenceUsingEspeak (/app/.next/standalone/node_modules/echogarden/src/alignment/SpeechAlignment.ts:670:6)
web-1 | at async align2 (/app/.next/standalone/node_modules/echogarden/src/api/Alignment.ts:215:8)
web-1 | at async alignSegments (/app/.next/standalone/node_modules/echogarden/src/api/Alignment.ts:371:44)
web-1 | at async Object.recognize8 (/app/.next/standalone/node_modules/echogarden/src/recognition/OpenAICloudSTT.ts:87:15)
web-1 | at async recognize7 (/app/.next/standalone/node_modules/echogarden/src/api/Recognition.ts:273:32)
web-1 | at async transcribeTrack (/app/.next/standalone/web/src/transcribe.ts:338:42)
web-1 | }
What is the current bug behavior?
Creation fails
What is the expected correct behavior? (optional)
Creation should work as expected
Edited by Paul