Speechmatics STT + multi-speaker conversations #2036
Draft
+753
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an early development of the Speechmatics STT plugin for pipecat. It not only takes advantage of our fast STT engine, but also introduces the speaker diarization - this means the agent knows who is speaking in multi-speaker conversations.
User:
<S1>Hello, it's John here!</S1> <S2>And Emma!</S2>
Assistant:
Hello both of you!
User:
<S2>Who is speaking now?</S2>
Assistant:
That's Emma!
By providing instructions in the system context, it is possible for larger LLMs to be able to deduce from the speaker tags who is who. With Speechmatics, you can also pass in known speaker voice-prints and this will mean the STT and LLM will know who is speaking by name and not just an index.
This is a work in progress, as there are challenges in how the speaker information is used within other LiveKit pipeline modules, such as end of turn detection. At the moment the Speechmatics STT will do speech-based endpointing and this is used for end of utterance.
The README in the module directory is for reference as we develop!