diff --git a/src/default_task_detector.cpp b/src/default_task_detector.cpp index ae4447e877..09f2119559 100644 --- a/src/default_task_detector.cpp +++ b/src/default_task_detector.cpp @@ -170,6 +170,7 @@ bool Text2SpeechDetector::scan(const ModelCatalogContext& ctx) const { const std::string arch = a.GetString(); if (arch == "ParlerTTSForConditionalGeneration" || arch == "SpeechT5ForTextToSpeech" || + arch == "KModel" || // Kokoro TTS endsWith(arch, "ForTextToSpeech")) return true; } diff --git a/src/test/task_determine_test.cpp b/src/test/task_determine_test.cpp index 83b5dd86f5..25a15997ee 100644 --- a/src/test/task_determine_test.cpp +++ b/src/test/task_determine_test.cpp @@ -157,6 +157,10 @@ TEST(TaskDetectorTest, Text2SpeechDetectsNullArchWithNMels) { auto ctx = makeCtx("kokoro", R"({"architectures":null,"n_mels":80})"); EXPECT_TRUE(ovms::Text2SpeechDetector{}.scan(ctx)); } +TEST(TaskDetectorTest, Text2SpeechDetectsKModelArch) { + auto ctx = makeCtx("kokoro", R"({"architectures":["KModel"],"n_mels":80})"); + EXPECT_TRUE(ovms::Text2SpeechDetector{}.scan(ctx)); +} TEST(TaskDetectorTest, Text2SpeechDoesNotMatchNullArchWithoutNMels) { auto ctx = makeCtx("unknown", R"({"architectures":null})"); EXPECT_FALSE(ovms::Text2SpeechDetector{}.scan(ctx));