Skip to content

Commit

Permalink
expose forward pass of encodec
Browse files Browse the repository at this point in the history
  • Loading branch information
PABannier committed Oct 1, 2023
1 parent a555830 commit 21164a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions encodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,9 @@ static struct ggml_cgraph * encodec_build_graph(
return gf;
}

static bool encodec_model_eval(
std::vector<float> & raw_audio,
bool encodec_model_eval(
encodec_context & ectx,
std::vector<float> & raw_audio,
int n_threads) {
const int64_t t_start_ms = ggml_time_ms();

Expand Down
5 changes: 5 additions & 0 deletions encodec.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,9 @@ struct encodec_model encodec_load_model_from_file(std::string fname);

struct encodec_context encodec_new_context_with_model(encodec_model & model);

bool encodec_model_eval(
encodec_context & ectx,
std::vector<float> & raw_audio,
int n_threads);

void encodec_free(encodec_context & ectx);

0 comments on commit 21164a8

Please sign in to comment.