-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VoicePipelineAgent don't send the transcription automatically to client #236
Comments
I left a comment in the docs. I had the same issue. I think I saw a comment somewhere saying they were working on this. This is what i'm going with until this is added:
Then catch it in the front-end with the code in the docs. |
our method of sending transcription events is currently very rudimentary; this is something we're working on for a future release |
Thanks, @valdrox! Slightly modified to: let messageCounter = 0
const handleSpeechCommitted = async (msg: ChatMessage) => {
let content = ''
if (Array.isArray(msg.content)) {
content = msg.content
.map(c => {
if (typeof c === 'string') return c
if ('text' in c) return c.text
return ''
})
.join(' ')
} else if (typeof msg.content === 'string') {
content = msg.content
}
if (content) {
messageCounter++
const textForwarder = new BasicTranscriptionForwarder(
ctx.room,
participant.identity!,
'trackSid',
messageCounter.toString()
)
textForwarder.start()
textForwarder.pushText(content)
textForwarder.markTextComplete()
textForwarder.close(false)
}
}
agent.on(pipeline.VPAEvent.USER_SPEECH_COMMITTED, handleSpeechCommitted)
agent.on(pipeline.VPAEvent.AGENT_SPEECH_COMMITTED, handleSpeechCommitted) |
agent and user transcriptions will be sent on VoicePipelineAgent, with PR #301. |
I tried to use VoicePipelineAgent but didn't receive the transcription from client when listening to event RoomEvent.TranscriptionReceived
The livekit document mention "VoicePipelineAgent and MultimodalAgent can generate and deliver transcriptions automatically".
I also try to find the code that implement the transcription forwarding but look like it hasn't implemented yet
Here is my code to setup VoicePipelineAgent
The text was updated successfully, but these errors were encountered: