real time transcript on website during the call
# support
t
Hi, please help me the instruction to put real time transcript on the website during the call
v
Hi there! 👋 I can't provide specific instructions on how to display the transcript on your website's frontend, but I can definitely help you with getting the real-time transcript data from Vapi that you'll need to display! Here's how to get real-time transcripts during a call with Vapi: 1. Configure serverMessages for real-time transcripts To receive real-time transcripts, you need to configure your assistant's
serverMessages
to include "transcript":
Copy code
json
   {
     "serverMessages": [
       "transcript",
       "end-of-call-report"
     ]
   }
According to the [Vapi documentation](https://docs.vapi.ai/api-reference/calls/create), this configuration will send real-time transcriptions to your server via webhooks. 2. Receive transcript data via webhooks Your server will receive real-time transcripts in this format:
Copy code
json
   {
     "message": {
       "type": "transcript",
       "transcript": "User's speech text",
       "role": "user",
       "transcriptType": "final"
     }
   }
As mentioned in [Vapi's Discord channel](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341440757189578782), this data includes the speaker's role and whether it's a partial or final transcript. 3. Use ClientMessageTranscript event (alternative approach) According to [another Discord thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1260258706667343892), you can also use the
ClientMessageTranscript
event and check if
transcriptType
is "final" to get the final transcript of both user and assistant. This can help filter out repetitive messages. 4. Choose a transcription provider Vapi supports various transcription providers with real-time capabilities: - AssemblyAI: Offers sub-second latency for speech-to-text conversion - Talkscriber: Provides instantaneous conversion of speech to text
- Gladia: Excels in real-time transcription and translation Once you have this real-time transcript data flowing to your server, you would need to implement a frontend solution to display it on your website, which would typically involve WebSockets or Server-Sent Events to push the transcript updates to the browser in real-time. Is there anything specific about getting the transcript data from Vapi that you'd like me to explain further? Sources: - [Vapi documentation](https://docs.vapi.ai/api-reference/calls/create) - [Vapi's Discord channel](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341440757189578782) - [Discord thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1260258706667343892) - [Providers documentation](https://docs.vapi.ai/providers/transcriber/assembly-ai) - [Providers documentation](https://docs.vapi.ai/providers/transcriber/talkscriber) - [Providers documentation](https://docs.vapi.ai/providers/transcriber/gladia)
k
You need to select the client message type transcript, and then it will be sent out to you on your frontend/client-side. You have to filter the message type of time drop script on your frontend, and then you can render it. Either using the Client Web SDK or an HTML script tag, you can render the transcript on the frontend.