Post
Topic
Board Services
Re: WANTED: YouTube Live (or X Live) transcribe via AI
by
KarmaHODL
on 20/05/2025, 19:12:00 UTC
Hello DannyHamilton!

I’m sharing the instructions on how to do it.
You can skip using Whisper if you prefer to upload the audio files manually to Fireflies.

I can try to set this up for you on EC2, but I’ll admit - I haven’t worked much with EC2. If the free tier allows it, I can give it a shot.

1. Requirements
-Linux/macOS or Windows with WSL installed
-Terminal access
-Internet connection

2. Install required tools
On Linux (Ubuntu/Debian) or WSL terminal:
Code:
sudo apt update
sudo apt install -y ffmpeg python3-pip
pip3 install yt-dlp
pip3 install openai-whisper

On macOS (with Homebrew):
Code:
brew install ffmpeg
pip3 install yt-dlp openai-whisper


3. Create the recording & transcription script
Create a file named record_and_transcribe.sh with this content:
Code:
#!/bin/bash

# Check if URL argument is given
if [ -z "$1" ]; then
  echo "Usage: $0 <YouTube_Live_URL> [duration_in_seconds]"
  exit 1
fi

URL=$1
DURATION=${2:-1800}  # default 1800 seconds (30 minutes)
OUTPUT="live_audio_$(date +%Y%m%d_%H%M%S).wav"
TRANSCRIPT="transcript_$(date +%Y%m%d_%H%M%S).txt"

echo "Recording audio from: $URL for $DURATION seconds..."
yt-dlp -f bestaudio -o - "$URL" | ffmpeg -i pipe:0 -t $DURATION -c:a pcm_s16le "$OUTPUT"

echo "Recording finished: $OUTPUT"
echo "Starting transcription with Whisper..."

whisper "$OUTPUT" --model tiny --output_format txt --output_dir .

# Rename transcript to consistent filename
mv "${OUTPUT%.*}.txt" "$TRANSCRIPT"

echo "Transcription complete."
echo "Audio file: $OUTPUT"
echo "Transcript file: $TRANSCRIPT"

Make it executable:

Code:
chmod +x record_and_transcribe.sh

4. Run the script
For example, to record 10 minutes:

Code:
./record_and_transcribe.sh https://www.youtube.com/watch?v=YOUR_LIVE_LINK 600

5. Result
-A .wav audio file with recorded live stream audio
-A .txt file with the transcript of the audio

Open the .txt file with any text editor to see the transcription.

6. Optional notes
Adjust the duration_in_seconds parameter to change recording length.

Whisper’s tiny model is fast and light; for better accuracy use larger models (base, small, medium, or large) but they require more resources.

For Windows users, use WSL Ubuntu or Git Bash with Linux tools installed.


If this works for you, feel free to leave a tip Smiley

If you want me to set this up on EC2, I can give it a try.