I am trying to use speechmatics stt but the text i...
# ask-ai
m
I am trying to use speechmatics stt but the text is never passed to the llm it keeps saying interim results. How do I fix this?
t
Thanks for reaching out, Matt. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Your issue occurs because only interim (partial) Speechmatics STT results are being processed, not the finalized transcriptions. To ensure the LLM receives finalized text, follow these steps: • Process Only Final Transcript Events: Verify that your implementation listens for the
FINAL_TRANSCRIPT
event, not just
INTERIM_TRANSCRIPT
. Only send final results to the LLM. • Event Handlers: Check that your
on_final_transcript
handler is registered and properly emits or forwards finalized text for downstream processing. • Turn Commitment: Ensure your solution calls
commit_user_turn()
and waits for final transcripts before fallback to interim. • STT Configuration: Confirm that your Speechmatics instance and turn detection config (VAD/manual) are set up to produce and handle final events. • Timeouts: Adjust transcript finalization timeouts to allow final events to arrive before falling back to partials. This setup ensures only finalized transcriptions are sent to the LLM, preventing the use of interim results in LLM responses. Let me know if you need help checking your event handling or configuration details. Sources: Speech-to-text (STT) integrations | LiveKit Docs | livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/stt.py | LiveKit turn detector plugin | LiveKit Docs
m
I never seem to get a final transcript
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!