Corrige erro de concatenação quando timestamps são None

This commit is contained in:
VectorAICreations 2025-05-25 00:17:30 -03:00 committed by GitHub
parent ce22f60344
commit 42e6b9e95b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: