For a given question finding answers in video subtitles and also linking to the subtitle


Any ideas on which APIs to use for searching answers in video subtitles, and also linking to the video and subtitle where the ‘answer’ was found/derived from?

For instance, there could be a series of videos on mental health covering depression, dealing with trauma, distress management, etc.
When a question related to depression is asked, like, what are the early signs of depression, then the answer (assuming it is present) should be derived from the subtitles of the video(s) on depression, and the source should also be linked.

In this case, getting the videos and their subtitles is not a challenge.


1 Like

Hi @systems,

I don’t know a tool and I think there is none available at the moment. However I have a Idea how to realize what you’re trying to achive:

  1. Use the general ChatGPT-API to get search terms for Youtube serch terms

  2. Use a youtube API to query the URL’s for the Videos regarding the search terms

  3. Use this Web-App build by a user here on the forum Summarize youtube videos with just one click - Share your app/project - OpenAI API Community Forum (however I’m not sure if there is a API available, maybe get in touch with the developer directly?) to get the summary for the Videos and use this to search for the awnswers

Hope this helps or you can leverage one of the mentioned points :slight_smile:

Thanks for your detailed response @linus. In this case, getting the videos and their subtitles is not a challenge. Should have made this explicit in the post.

What needs to be done is to search the subtitles and find related subtitles for what is searched and link that moment in the video.


Hi @systems,

please excuse my long reply time, I had no adequate solution for you at the time but when I came over a different thread here in the forum I thought this would be a viable approach for your use case:Embeddings - OpenAI API

Did you consider embeddings as a option for your project already?

Your welcome :slight_smile:

Hi @systems ,

I found a perfect answer!!!

8. OpenAI Question Answering - Financial Advisor Embeddings - YouTube In this YouTube Video your question is adressed perfectly.

Short summary - use embeddings! :slight_smile:

1 Like

Thanks, @linus for your responses and no problem about the delay. As you rightly guessed had started using OpenAI Embeddings with Vector Store and Langchain to build a solution. Works well overall. But randomly, for the same input text and question it ends up taking up to 7 minutes to generate a response.

Glad to hear that!

i believe current long processing times are due to the infrastructure changes on open AI’s end so this should get better in the next couple of days. There are a lot of posts regarding related issued (timeouts, long processing times…) at the Moment. It’s nit the first time this happens and should become better soon (at least I hope so :slight_smile: )

1 Like