diff --git a/encodec.cpp b/encodec.cpp index de42a7c..5548db6 100644 --- a/encodec.cpp +++ b/encodec.cpp @@ -773,11 +773,13 @@ struct ggml_tensor * encodec_forward_encoder( // first lstm layer struct ggml_tensor * hs1 = forward_pass_lstm_unilayer( - ctx0, allocr, cur, lstm.l0_ih_w, lstm.l0_hh_w, lstm.l0_ih_b, lstm.l0_hh_b); + ctx0, allocr, cur, lstm.l0_ih_w, lstm.l0_hh_w, + lstm.l0_ih_b, lstm.l0_hh_b); // second lstm layer struct ggml_tensor * out = forward_pass_lstm_unilayer( - ctx0, allocr, hs1, lstm.l1_ih_w, lstm.l1_hh_w, lstm.l1_ih_b, lstm.l1_hh_b); + ctx0, allocr, hs1, lstm.l1_ih_w, lstm.l1_hh_w, + lstm.l1_ih_b, lstm.l1_hh_b); inpL = ggml_add(ctx0, inpL, out); } diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 0332246..a8527b8 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -25,6 +25,8 @@ int main(int argc, char **argv) { return 1; } + encodec_set_target_bandwidth(ectx, 12); + // read audio from disk std::vector original_audio_arr; if(!read_wav_from_disk(params.input_path, original_audio_arr)) { @@ -40,6 +42,7 @@ int main(int argc, char **argv) { // write reconstructed audio on disk auto & audio_arr = ectx->out_audio; + audio_arr.resize(original_audio_arr.size()); // output is slightly longer than input write_wav_on_disk(audio_arr, params.output_path); // report timing diff --git a/ggml b/ggml index 9d10023..d5b778d 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit 9d1002375fc476f995cd4f5311de3fae1c63bb88 +Subproject commit d5b778d1bd86d40ce8a81fcbc8b132196ad1befe