Speechmatics raw API supports confidence values, but LiveKit’s Speechmatics plugin currently hardcodes SpeechData.confidence to 1.0, causing LiveKit Sessions and transcript_confidence-based logic to always show 100%. Is this intentional, or can the plugin propagate real provider confidence when available?
Looks like that change was introduced in Updated Speechmatics STT integration by sam-s10s · Pull Request #4703 · livekit/agents · GitHub, before which it used the reported confidence value rather than hardcoding to 1.0. I don’t see any mention in the comments or description about confidence however, so I’m unsure why it was hardcoded.
can the plugin propagate real provider confidence when available?
That PR makes quite a few structural changes to the plugin and it looks to me like it would not be simple to add that confidence field back in whilst retaining the existing architecture (perhaps that’s why it was hardcoded
). I’m not an expert in the code however, it might be worth raising an issue on the repo and referencing that PR.