# Get Captions in real time

**URL:** <https://devforum.zoom.us/t/get-captions-in-real-time/115155>\
**Category:** Meeting SDK\
**Created:** [August 6, 2024, 10:52pm UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155 "2024-08-06T22:52:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![noahviktorschenk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/noahviktorschenk/32/74873_2.png) [@noahviktorschenk](https://devforum.zoom.us/u/noahviktorschenk)\
**Post date:** [August 6, 2024, 10:52pm UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/1 "2024-08-06T22:52:37Z")

</div>

Hey there,

I wanted to hear if it would be possible to get the live captions from the meeting. I am building a headless bot using the Linux SDK and wanted to retrieve the captions. In a perfect world, I would query it every x seconds and get the captions since the last time it was queried. Is there any way to do this?

Thanks

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 7, 2024, 5:25am UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/2 "2024-08-07T05:25:26Z")

</div>

@noahviktorschenk seems like Meeting SDK for Linux does not have this capability at this moment.

On the other hand, Meeting SDK for Windows does have the IClosedCaptionControllerEvent which provides you with captions and transcription.

---

<div class="post-metadata">

**Author:** ![noahviktorschenk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/noahviktorschenk/32/74873_2.png) [@noahviktorschenk](https://devforum.zoom.us/u/noahviktorschenk)\
**Post date:** [August 7, 2024, 11:13am UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/3 "2024-08-07T11:13:59Z")

</div>

@chunsiong.zoom yeah, okay. We have already built the application using the Linux SDK.

Am I correct in thinking that we would be able to get the live audio track and from that transcribe it ourselves using a third party?

If so, do you have any resources on how this could be implemented that you could point to?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 8, 2024, 2:59am UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/4 "2024-08-08T02:59:59Z")

</div>

@noahviktorschenk if you are looking at a live-stream type of scenario, you will need to

1. get the raw audio in PCM (this is provided by zoom)
2. convert the buffer/frames /streaminto 3rd party accepted format
3. send the converted audio frames/stream to the 3rd party service
4. get back the translated caption from the 3rd party service

You will need to implement step 2,3,4 on your end.

---

<div class="post-metadata">

**Author:** ![amanda-recallai](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amanda-recallai/32/44747_2.png) [@amanda-recallai](https://devforum.zoom.us/u/amanda-recallai)\
**Post date:** [August 8, 2024, 3:22am UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/5 "2024-08-08T03:22:32Z")

</div>

Hey @noahviktorschenk ,

If you’re open to using a third party API, you could consider the [Recall.ai API](https://www.recall.ai/?utm_source=zoom_dev_forum&utm_medium=forum_answer&utm_campaign=get-captions-in-real-time&utm_content=Recall.ai_API).

Here is the guide to get real-time transcription from Zoom with the Recall API: [Real-Time Transcription](https://docs.recall.ai/docs/real-time-transcription)

---

<div class="post-metadata">

**Author:** ![noahviktorschenk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/noahviktorschenk/32/74873_2.png) [@noahviktorschenk](https://devforum.zoom.us/u/noahviktorschenk)\
**Post date:** [August 8, 2024, 3:28pm UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/6 "2024-08-08T15:28:36Z")

</div>

@chunsiong.zoom I will most likely need them as an _m4a, mp3, mp4, mpeg, mpga, wav_ or _webm_ in 10 seconds intervals.

Just to make sure, this is possible, correct?

Also, is the audio stream split up into the different participants or just one singular?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 12, 2024, 1:57am UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/7 "2024-08-12T01:57:28Z")

</div>

@noahviktorschenk , we only provide you with step 1.

You will need to convert the raw audio in PCM format to m3a, mp3, mp4, mpg etc…

There are 2 callbacks, one which returns multiple individual audio, and the other which returns single audio with everyone in it.

---

<div class="post-metadata">

**Author:** ![noahviktorschenk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/noahviktorschenk/32/74873_2.png) [@noahviktorschenk](https://devforum.zoom.us/u/noahviktorschenk)\
**Post date:** [August 12, 2024, 4:41pm UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/8 "2024-08-12T16:41:38Z")

</div>

Okay, no problem.

Do you have some sample code or recourse for how to implement step 1?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 13, 2024, 4:34am UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/9 "2024-08-13T04:34:48Z")

</div>

@noahviktorschenk

In this sample

> **[GitHub - zoom/meetingsdk-linux-raw-recording-sample](https://github.com/zoom/meetingsdk-linux-raw-recording-sample)**
>
> Contribute to zoom/meetingsdk-linux-raw-recording-sample development by creating an account on GitHub.

There is a boolean variable `GetAudioRawData` in `meeting_sdk_demo.cpp` which shows what are some of the methods to call.

Once the audio has been subscribed, the callback would be found in  
`ZoomSDKAudioRawData.cpp`

the sample code found inside the class saves the audio into a PCM file

```auto
void ZoomSDKAudioRawData::onMixedAudioRawDataReceived(AudioRawData* audioRawData)
{
	std::cout << "Received onMixedAudioRawDataReceived" << std::endl;
	//add your code here

	static std::ofstream pcmFile;
	pcmFile.open("audio.pcm", std::ios::out | std::ios::binary | std::ios::app);

	if (!pcmFile.is_open()) {
		std::cout << "Failed to open wave file" << std::endl;
		return;
	}
	
		// Write the audio data to the file
		pcmFile.write((char*)audioRawData->GetBuffer(), audioRawData->GetBufferLen());
		//std::cout << "buffer length: " << audioRawData->GetBufferLen() << std::endl;
		std::cout << "buffer : " << audioRawData->GetBuffer() << std::endl;

		// Close the wave file
		pcmFile.close();
		pcmFile.flush();
}

```

---

<div class="post-metadata">

**Author:** ![noahviktorschenk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/noahviktorschenk/32/74873_2.png) [@noahviktorschenk](https://devforum.zoom.us/u/noahviktorschenk)\
**Post date:** [August 13, 2024, 5:23pm UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/10 "2024-08-13T17:23:36Z")

</div>

@chunsiong.zoom Ah, perfect. Thank you so much.

Just read through the documentation for the meeting SDK, and it has an IClosedCaptionController, which has a StartLiveTranscription function. Would these not work?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 14, 2024, 5:08am UTC](https://devforum.zoom.us/t/get-captions-in-real-time/115155/11 "2024-08-14T05:08:53Z")

</div>

@noahviktorschenk  
Yes it will work, for Windows.  
There is no such controller in Linux.
