Skip to content

Commit 6fcc869

Browse files
author
crispasr integration
committed
fix(#434,#377): three post-merge CI failures, all real gaps in both ports
None of these are merge artifacts — each would have failed on either branch alone. The merge is simply the first time all of CI ran against them: the fireredtts3 branch's own Piper/Windows run died at the BUILD step and never reached these, and the supertonic branch predates them. 1. LINK FAILURE under GGML_BACKEND_DL (CI job linux-backend-dl, "Build (the link is the test)"): libcrispasr.so: undefined reference to `ggml_backend_is_cpu' libcrispasr.so: undefined reference to `ggml_backend_cpu_set_n_threads' Under DL the CPU backend is a dlopen'd module, so those symbols are not linkable. src/core/ggml_cpu_backend.h exists precisely for this and both files already INCLUDED it and used core_cpu_backend::is_cpu in most places — the set_n_threads calls were raw, plus two raw is_cpu calls in fireredtts3. Swept the whole tree afterwards: every other match in src/*.cpp is a comment or a log string, so these two were the only real offenders. 2. UNIT TEST tests/test-arch-backend-map.cpp:265 — "every emitted backend name is a name a surface can open", 5 assertions. Both ports added entries to src/core/arch_backend_map.h and neither added the backend to the test's hand-maintained `known` list, so the map emitted supertonic / supertonic-tts / supertonic_tts / fireredtts3 / fireredtts3-redae as names no surface claimed to open. Added "supertonic" and "fireredtts3". 3. CLANG-FORMAT violation at src/crispasr_c_api.cpp:9673, from the auto-merged supertonic session arm. Reformatted and re-verified clean with the same clang-format-18 CI uses. Also confirmed NOT ours, and left alone: "Piper Windows Live / Prove HTTP WAV and chunked PCM" fails on `$asr -notmatch 'great job'`, having transcribed "Hello how are you today? UT-Tay Quit Job Today." The first sentence is recovered correctly and NO commit since that workflow's last green run (3ac0fef, 2026-09-07) touches piper, the server, or sentence chunking — checked by path, not assumed. The gate is a single-phrase whisper-base match on TTS audio, which is a fragile predicate. Reported rather than chased.
1 parent 6b92067 commit 6fcc869

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/crispasr_c_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9670,8 +9670,8 @@ static float* crispasr_session_synthesize_raw_impl(crispasr_session* s, const ch
96709670
if (s->supertonic_ctx) {
96719671
// Supertonic-3 outputs 44.1 kHz mono. Language follows the sticky
96729672
// session languages (target first — this is the OUTPUT language).
9673-
const std::string lang = !s->target_language.empty() ? s->target_language
9674-
: (!s->source_language.empty() ? s->source_language : "");
9673+
const std::string lang =
9674+
!s->target_language.empty() ? s->target_language : (!s->source_language.empty() ? s->source_language : "");
96759675
if (!lang.empty() && lang != "auto")
96769676
supertonic_set_language(s->supertonic_ctx, lang.c_str());
96779677
int n = 0;

src/fireredtts3_tts.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,10 +1200,10 @@ extern "C" struct fireredtts3_tts_context* fireredtts3_tts_init_from_file(
12001200
if (!ctx->backend)
12011201
ctx->backend = core_cpu_backend::init();
12021202
ctx->backend_cpu = core_cpu_backend::init();
1203-
if (ggml_backend_is_cpu(ctx->backend))
1204-
ggml_backend_cpu_set_n_threads(ctx->backend, params.n_threads > 0 ? params.n_threads : 4);
1205-
if (ggml_backend_is_cpu(ctx->backend_cpu))
1206-
ggml_backend_cpu_set_n_threads(ctx->backend_cpu, params.n_threads > 0 ? params.n_threads : 4);
1203+
if (core_cpu_backend::is_cpu(ctx->backend))
1204+
core_cpu_backend::set_n_threads(ctx->backend, params.n_threads > 0 ? params.n_threads : 4);
1205+
if (core_cpu_backend::is_cpu(ctx->backend_cpu))
1206+
core_cpu_backend::set_n_threads(ctx->backend_cpu, params.n_threads > 0 ? params.n_threads : 4);
12071207

12081208
// ---- metadata ----
12091209
{

src/supertonic_tts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ struct supertonic_context* supertonic_init_from_file(const char* path_model, sup
10191019
return nullptr;
10201020
}
10211021
if (core_cpu_backend::is_cpu(ctx->backend))
1022-
ggml_backend_cpu_set_n_threads(ctx->backend, params.n_threads > 0 ? params.n_threads : 4);
1022+
core_cpu_backend::set_n_threads(ctx->backend, params.n_threads > 0 ? params.n_threads : 4);
10231023

10241024
if (!core_gguf::load_weights(path_model, ctx->backend, "supertonic", ctx->weights)) {
10251025
supertonic_free(ctx);
@@ -1215,7 +1215,7 @@ void supertonic_free(struct supertonic_context* ctx) {
12151215

12161216
void supertonic_set_n_threads(struct supertonic_context* ctx, int n_threads) {
12171217
if (ctx && core_cpu_backend::is_cpu(ctx->backend) && n_threads > 0)
1218-
ggml_backend_cpu_set_n_threads(ctx->backend, n_threads);
1218+
core_cpu_backend::set_n_threads(ctx->backend, n_threads);
12191219
}
12201220

12211221
int supertonic_set_voice(struct supertonic_context* ctx, const char* voice) {

tests/test-arch-backend-map.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ TEST_CASE("every emitted backend name is a name a surface can open", "[unit][arc
243243
"dia",
244244
"dots-tts",
245245
"confucius4-tts",
246+
"supertonic",
247+
"fireredtts3",
246248
"csm",
247249
"parler-tts",
248250
"m2m100",

0 commit comments

Comments
 (0)