Skip to content

Commit

Permalink
more verbose errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PABannier committed Jan 7, 2024
1 parent 1fbe29d commit b3d9179
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions bark/bark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2102,11 +2102,8 @@ bool bark_generate_audio(
}
}

fprintf(stderr, "fine_tokens shape: [%zu, %zu]\n", bctx->fine_tokens.size(), bctx->fine_tokens[0].size());
fprintf(stderr, "encodec_tokens shape: [%zu]\n", encodec_tokens.size());

if (!encodec_decompress_audio(ectx, encodec_tokens, n_threads)) {
printf("%s: error during audio generation\n", __func__);
printf("%s: Could not generate waveform from tokens with Encodec\n", __func__);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion bark/examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(int argc, char **argv) {

// generate audio
if (!bark_generate_audio(bctx, params.prompt, params.dest_wav_path, params.n_threads, verbosity)) {
fprintf(stderr, "%s: Could not generate audio\n", __func__);
fprintf(stderr, "%s: An error occured. If the problem persists, feel free to open an issue to report it.\n", __func__);
exit(1);
}

Expand Down
2 changes: 1 addition & 1 deletion encodec.cpp

0 comments on commit b3d9179

Please sign in to comment.