diff --git a/api/src/routers/development.py b/api/src/routers/development.py index d78aa3c..dc21c96 100644 --- a/api/src/routers/development.py +++ b/api/src/routers/development.py @@ -225,8 +225,8 @@ async def create_captioned_speech( # Add any chunks that may be in the acumulator into the return word_timestamps if chunk_data.word_timestamps is not None: - chunk_data.word_timestamps = ( - timestamp_acumulator + chunk_data.word_timestamps + chunk_data.word_timestamps = (timestamp_acumulator or []) + (chunk_data.word_timestamps or []) + ) timestamp_acumulator = [] else: