test(gallery): expect speaker_recognition on the bundles with a voice component

The parakeet-cpp backend now answers VoiceEmbed and VoiceVerify, so the
pinning test asserts the usecase on the entries that declare it instead of
its absence. Document voice_verify_threshold.

Assisted-by: Claude Code:claude-sonnet-5-5
This commit is contained in:
Ettore Di Giacinto committed 2026-10-05 23:48:20 +00:00
1 parent 1f22b16092
commit 7467b51281
2 files changed
+6 -6

No files matched your search

+3 -6
View File
@@ -65,18 +65,15 @@ var _ = Describe("gallery/index.yaml parakeet-cpp bundle entries", func() {
}
})
// speaker_recognition is deliberately absent: that usecase means the model
// answers the /v1/voice/* RPCs (VoiceEmbed, VoiceVerify), which the
// parakeet-cpp backend does not implement, and it picks the default model
// for those routes. Naming registered speakers works from the
// speaker_component option alone, with no usecase.
// speaker_recognition means the model answers the /v1/voice/* RPCs
// (VoiceEmbed, VoiceVerify). The parakeet-cpp backend does since it binds
// parakeet_capi_speaker_embed_pcm, so entries with a speaker encoder declare it.
It("declares the usecases and options of the roles each bundle covers", func() {
all := entries()
for name, w := range want {
e := all[name]
Expect(e.Overrides["known_usecases"]).To(ConsistOf(toAny(w.usecases)...), name)
Expect(e.Overrides["options"]).To(ConsistOf(toAny(w.options)...), name)
Expect(e.Overrides["known_usecases"]).ToNot(ContainElement("speaker_recognition"), name)
}
})
@@ -230,6 +230,9 @@ other. Use a distance threshold near 0.5 for this encoder, as for `speaker_model
naming below. The response `model` field is the `sha256:` identity of the encoder
weights.
`/v1/voice/verify` uses a distance threshold of 0.5 when the request has none. Set the
model option `voice_verify_threshold:<distance>` (a distance in (0, 2)) to change it.
Only embedding, identification and plain verification are available. There is no
anti-spoofing head, so a verify request with `anti_spoofing: true` is refused, and
`/v1/voice/analyze` is not served by parakeet-cpp. The backend needs a libparakeet.so