| 2159 | } |
| 2160 | |
| 2161 | static bool bark_forward_eval(struct bark_context* bctx, int n_threads) { |
| 2162 | if (!bark_forward_text_encoder(bctx, n_threads)) { |
| 2163 | fprintf(stderr, "%s: failed to forward text encoder\n", __func__); |
| 2164 | return false; |
| 2165 | } |
| 2166 | |
| 2167 | if (!bark_forward_coarse_encoder(bctx, n_threads)) { |
| 2168 | fprintf(stderr, "%s: failed to forward coarse encoder\n", __func__); |
| 2169 | return false; |
| 2170 | } |
| 2171 | |
| 2172 | if (!bark_forward_fine_encoder(bctx, n_threads)) { |
| 2173 | fprintf(stderr, "%s: failed to forward fine encoder\n", __func__); |
| 2174 | return false; |
| 2175 | } |
| 2176 | |
| 2177 | return true; |
| 2178 | } |
| 2179 | |
| 2180 | bool bark_generate_audio(struct bark_context* bctx, const char* text, int n_threads) { |
| 2181 | if (!bctx) { |
no test coverage detected