broad-lamp-30178
09/04/2025, 9:46 PMtall-airline-16756
09/04/2025, 9:46 PMtall-airline-16756
09/04/2025, 9:46 PMTranscriptionEvent in LiveKit — it’s got a few key parts:
• transcribedParticipantIdentity (string): This tells you who the participant is whose speech got transcribed.
• trackId (string): The server identifier (SID) for the audio track that’s being transcribed.
• segments (array): A list of TranscriptionSegment objects that hold the actual transcription data.
Now, each TranscriptionSegment includes:
• id (string): A unique ID for that segment.
• text (string): The transcribed text itself.
• startTime (uint64): When the segment starts, in nanoseconds since the track began.
• endTime (uint64): When it ends, also in nanoseconds.
• final (boolean): This tells you if the segment is final — meaning it won’t be updated anymore.
• language (string): The language code, like "en" for English.
Just a heads up, different SDKs might add their own little extras to this structure. For instance, the Flutter SDK includes firstReceivedTime and lastReceivedTime to help with client-side timing, and JavaScript frontends keep track of similar timestamps for rendering and avoiding duplicates.
If you want me to dive into the details for a specific SDK, just say the word — I’m here to help!
Sources: lib/src/types/transcription_segment.dart | livekit-protocol/livekit/protocol/models.pyi | packages/livekit-rtc/src/transcription.ts | Sources/LiveKit/Protos/livekit_models.pb.swift | Transcriptions | LiveKit Docsbroad-lamp-30178
09/04/2025, 9:48 PMtall-airline-16756
09/04/2025, 9:49 PMkind property of the participant:
• STANDARD: This means it's a regular end-user.
• AGENT: This indicates an AI agent or bot.
Most SDKs make this super easy with helper methods or properties:
• In the Swift SDK, you can simply use the isAgent property to see if kind is .agent.
• For the JavaScript/TypeScript SDK, just check participant.kind === ParticipantKind.AGENT or use the handy isAgent getter.
• And in the Flutter SDK, the isAgent extension method helps you check if kind == sdk.ParticipantKind.AGENT.
If you want, I’m here to help you with the implementation in any specific SDK—just let me know!
Sources: Sources/LiveKit/Participant/Participant+Kind.swift | src/room/participant/Participant.ts | lib/exts.dart | Rooms, participants, and tracks | LiveKit Docsbroad-lamp-30178
09/04/2025, 9:50 PMtall-airline-16756
09/04/2025, 9:51 PMkind property of the Participant class to see if the participant is an agent. LiveKit offers a handy ParticipantKind enum that includes the AGENT type.
Example:
sdk.Participant participant = // obtain participant object
if (participant.kind == sdk.ParticipantKind.AGENT) {
// This participant is an agent
}
// Or, if you prefer using an extension method:
extension ParticipantAgentExt on sdk.Participant {
bool get isAgent => kind == sdk.ParticipantKind.AGENT;
}
if (participant.isAgent) {
// This participant is an agent
}
If you want me to walk you through this or need more examples, just let me know—I’m here to help!
Sources: lib/screens/agent_screen.dart | Rooms, participants, and tracks | LiveKit Docs | lib/src/types/attribute_typings.dartbroad-lamp-30178
09/04/2025, 9:57 PMisAgent already implemented or do we need to add this extension?tall-airline-16756
09/04/2025, 9:57 PMisAgent property isn’t built into the core LiveKit Flutter SDK by default. But no worries—it’s often added as a handy custom extension in example projects like the voice-assistant-flutter repo.
If you want to use this feature, here’s a simple extension you can add:
extension ParticipantAgentExt on sdk.Participant {
bool get isAgent => kind == sdk.ParticipantKind.AGENT;
}
This little extension just checks if the participant’s kind is ParticipantKind.AGENT. If you’d like, I’m happy to help you get this set up in your project—just let me know!
Sources: lib/support/agent_selector.dart | Sources/LiveKit/Types/Attributes/AttributeTypings.swift | pkg/rtc/types/typesfakes/fake_local_participant.go | Web and mobile frontends | LiveKit Docs