Skip to content

Commit

Permalink
Move cli message outside for-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
howardbaek committed Jun 5, 2023
1 parent b65d47b commit 8114b66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/ari_spin.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ ari_spin <- function(images, paragraphs,
# coqui+ari doesn't work with mp3
if (service == "coqui") {
args$output_format <- "wav"
cli::cli_alert_info("Coqui TTS does not support MP3 format and will produce a WAV audio output.")
}
wav <- do.call(text2speech::tts, args = args)
wav <- reduce(wav$wav, bind)
Expand All @@ -140,6 +139,10 @@ ari_spin <- function(images, paragraphs,
wave_objects[[i]] <- wav
pb$tick()
}
if (service == "coqui") {
cli::cli_alert_info("Coqui TTS does not support MP3 format; will produce a WAV audio output.")
}

# Burn subtitles
if (subtitles) {
sub_file <- paste0(file_path_sans_ext(output), ".srt")
Expand Down

0 comments on commit 8114b66

Please sign in to comment.