does the vapi sdk allow me to listen to the real-t...
# support
c
I want to receive the text of assistant in real time during a web call, via the sdk. Is this possible
v
Hi there! 👋 Yes, the Vapi SDK absolutely allows you to listen to real-time transcripts during a call, including receiving the assistant's text in real time during a web call! According to the [documentation I found](https://docs.vapi.ai/sdks), the Vapi Client SDKs (including the Web SDK) provide a
message
event specifically for "receiving messages sent to the Server URL locally on the client, so you can show live transcriptions." To set this up, you'll need to: 1. Configure your assistant's
serverMessages
to include "transcript" like this:
Copy code
json
{
  "serverMessages": [
    "transcript",
    "end-of-call-report"
  ]
}
[(Source)](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341440757189578782) 2. Listen for the
message
event in your code and filter for messages with
type === 'transcript'
. Here's an example of how you might implement this:
Copy code
ts
useEffect(() => {
  const handleMessage = (message) => {
    if (message.type === 'transcript' && message.transcriptType === 'final') {
      const { type, ...payload } = message;
      setMessages((prevMessages) => [
        ...prevMessages,
        { role: payload.role, content: payload.transcript },
      ]);
    }
  };

  vapi.on('message', handleMessage);
  
  // Cleanup function
  return () => {
    vapi.off('message', handleMessage);
  };
}, [vapi]);
[(Source)](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342498699615539222) You'll also need to make sure transcripts are enabled in your assistant's artifactPlan with
transcriptPlan.enabled: true
[(Source)](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342498699615539222). Is there anything specific about implementing this feature that you'd like me to explain further? Sources: - [Vapi SDKs Documentation](https://docs.vapi.ai/sdks)
c
@Vapi i don't want the final transcript, i want the real-time transcript
k
Hey, you can use the client messages conversation updates to get the real-time transcripts. You can also use partial transcript messages. Either of these will give you the transcript in real-time.