From 3c4e877f5d953abd93c54f8e6ae04d94f51843ba Mon Sep 17 00:00:00 2001 From: Angelo D'Ambrosio Date: Fri, 8 Mar 2024 15:50:50 +0100 Subject: [PATCH] fix: manages empty transcription json files --- R/data_management.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/data_management.R b/R/data_management.R index 56f562a..bd4d34c 100644 --- a/R/data_management.R +++ b/R/data_management.R @@ -81,6 +81,11 @@ parse_transcript_json <- function( "Please remove it and try transcription again.") } + if (length(transcript_list[[i]]$segments) == 0) { + # skip this file, there was nothing to transcribe + next + } + transcript_data <- transcript_list[[i]]$segments |> bind_rows() |> # Select only the columns to import