Skip to content

Commit

Permalink
cosmit
Browse files Browse the repository at this point in the history
  • Loading branch information
PABannier committed Oct 10, 2023
1 parent 3cc35c2 commit 2277c51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions encodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ struct ggml_cgraph * encodec_build_graph(

struct ggml_context * ctx0 = ggml_init(ggml_params);

struct ggml_cgraph * gf = ggml_new_graph(ctx0);
struct ggml_cgraph * gf = ggml_new_graph(ctx0);

struct ggml_tensor * inp = ggml_new_tensor_1d(ctx0, GGML_TYPE_F32, audio_length);
ggml_allocr_alloc(ectx.allocr, inp);
Expand Down Expand Up @@ -762,7 +762,7 @@ struct ggml_cgraph * encodec_build_graph(
}
}

print_tensor(encoded_inp);
// print_tensor(encoded_inp);

// quantizer (encode)
struct ggml_tensor * codes;
Expand Down
4 changes: 3 additions & 1 deletion examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool read_wav_from_disk(std::string in_path, std::vector<float>& audio_arr) {
return false;
}

fprintf(stderr, "%s: Number of frames read = %lld.\n", __func__, total_frame_count);
fprintf(stderr, "\n%s: Number of frames read = %lld.\n", __func__, total_frame_count);

audio_arr.resize(total_frame_count);
memcpy(audio_arr.data(), raw_audio, total_frame_count * sizeof(float));
Expand Down Expand Up @@ -128,6 +128,8 @@ int main(int argc, char **argv) {
return 1;
}

printf("\n");

// reconstruct audio
if (!encodec_reconstruct_audio(*ectx, original_audio_arr, params.n_threads)) {
printf("%s: error during inference\n", __func__);
Expand Down

0 comments on commit 2277c51

Please sign in to comment.