Skip to content

Commit 52de2e5

Browse files
authored
tts : remove printfs (#12640)
* tts.cpp : llama tokens console output is done using LOG_INF instead of printf(). Therefore the options '--log-disable' and '--log-file' have now uniform impact on all output.
1 parent 2c3f8b8 commit 52de2e5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/tts/tts.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,11 +699,13 @@ lovely<|t_0.56|><|code_start|><|634|><|596|><|1766|><|1556|><|1306|><|1285|><|14
699699
const std::string voice_data = audio_data;
700700

701701
auto tmp = common_tokenize(vocab, voice_data, false, true);
702-
printf("\n\n");
702+
703+
std::ostringstream tokens_oss;
703704
for (size_t i = 0; i < tmp.size(); ++i) {
704-
printf("%d, ", tmp[i]);
705+
tokens_oss << tmp[i] << ", ";
705706
}
706-
printf("\n\n");
707+
LOG_INF("\n\n%s: llama tokens: %s\n\n", __func__, tokens_oss.str().c_str());
708+
707709
prompt_add(prompt_inp, tmp);
708710
#else
709711
prompt_add(prompt_inp, llama_tokens {

0 commit comments

Comments
 (0)