MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / bark_context

Class bark_context

bark.cpp:133–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131};
132
133struct bark_context {
134 struct bark_model text_model;
135
136 struct encodec_context* encodec_ctx;
137
138 // buffer for model evaluation
139 ggml_backend_buffer_t buf_compute;
140
141 // custom allocator
142 struct ggml_allocr* allocr = NULL;
143 int n_gpu_layers = 0;
144
145 std::mt19937 rng;
146
147 bark_sequence tokens;
148 bark_sequence semantic_tokens;
149
150 bark_codes coarse_tokens;
151 bark_codes fine_tokens;
152
153 float* generated_audio = NULL;
154 int n_generated_samples = 0;
155
156 // hyperparameters
157 bark_context_params params;
158
159 // encodec parameters
160 std::string encodec_model_path;
161
162 // statistics
163 bark_statistics stats;
164};
165
166template <typename T>
167static void read_safe(std::ifstream& fin, T& dest) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected