Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: How do I query questions on a video transcript? #1211

Open
michnovka opened this issue Dec 16, 2024 · 2 comments
Open

[Question]: How do I query questions on a video transcript? #1211

michnovka opened this issue Dec 16, 2024 · 2 comments
Labels
question Further information is requested

Comments

@michnovka
Copy link

What is your question?

I am using the yt transcript command quite often, but I dont get how to ask a specific question, not to just apply the patterns which are stored locally.

E.g. Id like to ask:

yt https://youtu.be/QnpGj3VJEYA?si=s2rdpIICJNxlQitR | ask_question "What is the most favorite taco?"
  1. Is something like this possible?
  2. What is the best way to use yt XXX tool once and then ask on the transcript without doing the STT conversion over and over again? Like if I have the full transcript once for a video, its unlikely to change. Does fabric support cache for this?
@michnovka michnovka added the question Further information is requested label Dec 16, 2024
@rxsx
Copy link

rxsx commented Dec 17, 2024

I don't know if this is the best way to achieve this, but I found this way to ask questions about a YouTube video:

yt "https://www.youtube.com/watch?v=QnpGj3VJEYA" -transcript | awk '{print $0"--- What is the best taco?"}' | fabric

Or using a ZSH alias function:

function askv() {
  yt "$1" -transcript | awk -v q="$2" '{print $0" --- "q}' | fabric
}

and use
askv "https://www.youtube.com/watch?v=QnpGj3VJEYA" "What is the best Taco?"

@mattjoyce
Copy link
Contributor

mattjoyce commented Dec 22, 2024

You can query like this?

./fabric --transcript --youtube=https://www.youtube.com/watch\?v\=xApNGEdmdnU "what is the purpose of this utility?"

or this

echo "what is the purpose of this utility" | ./fabric --transcript --youtube=https://www.youtube.com/watch\?v\=xApNGEdmdnU

You need to configure fabric with a youtube api key first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants