|
Download docs/BEGINNER_GUIDE.md from bthaile/opteee: direct link, hf CLI and curl.
- Browser
- Download file 7.65 kB
-
https://huggingface.co/spaces/bthaile/opteee/resolve/main/docs/BEGINNER_GUIDE.md
- Command line
-
hf download hf://spaces/bthaile/opteee/docs/BEGINNER_GUIDE.md
-
curl -L -o BEGINNER_GUIDE.md https://huggingface.co/spaces/bthaile/opteee/resolve/main/docs/BEGINNER_GUIDE.md
7.65 kB
Beginner's Guide to Running Python Scripts
π You Don't Need to Configure Anything!
Good news: Your system is already set up! You have:
- Python 3.9.6 installed
- Virtual environment created (
venv/) - All required packages installed
- Project ready to use
π₯οΈ How to Open Terminal (Mac)
Method 1: Spotlight Search
- Press
Cmd + Space(Command + Spacebar) - Type "terminal"
- Press Enter
Method 2: Finder
- Open Finder
- Go to Applications β Utilities β Terminal
- Double-click Terminal
Method 3: Right-click in Project Folder
- Open Finder
- Navigate to
/Users/bthaile/gitrepos/opteee - Right-click in the folder β Services β New Terminal at Folder
πββοΈ How to Run Python Scripts (Step-by-Step)
Step 1: Open Terminal and Navigate
# Open Terminal (using any method above)
# Then navigate to your project:
cd /Users/bthaile/gitrepos/opteee
Step 2: Activate the Virtual Environment
# This loads all the required Python packages
source venv/bin/activate
# You should see (venv) at the beginning of your prompt:
# (venv) [bthaile@mbp:~/gitrepos/opteee]$
Step 3: Run Your Python Script
# Now you can run any Python script:
python3 whisper_transcribe.py
# Or the pipeline:
python3 run_pipeline.py --step transcripts
π Complete Example Session
Here's exactly what you'll type in Terminal:
# 1. Navigate to project
cd /Users/bthaile/gitrepos/opteee
# 2. Activate virtual environment
source venv/bin/activate
# 3. Run the transcription script
python3 whisper_transcribe.py
What you'll see:
[bthaile@mbp:~]$ cd /Users/bthaile/gitrepos/opteee
[bthaile@mbp:~/gitrepos/opteee]$ source venv/bin/activate
(venv) [bthaile@mbp:~/gitrepos/opteee]$ python3 whisper_transcribe.py
π΅ Starting Whisper transcription...
π Scanning audio_files/ for MP3 files...
Found 3 new MP3 files to process
π Processing oOyjSHIJSPs.mp3...
π― Your Workflow for Processing Downloaded MP3s
Every time you download MP3 files:
- Open Terminal
- Copy and paste these commands one by one:
cd /Users/bthaile/gitrepos/opteee source venv/bin/activate python3 whisper_transcribe.py
That's it! The system will automatically:
- Find your new MP3 files
- Process them with AI
- Create transcript files
- Update progress
π File Organization
opteee/
βββ audio_files/ # β PUT YOUR MP3 FILES HERE
β βββ oOyjSHIJSPs.mp3 # β Downloaded MP3 files
β βββ cbMpZUz22cQ.mp3 # β More MP3 files
βββ transcripts/ # β TRANSCRIPTS APPEAR HERE
β βββ oOyjSHIJSPs.txt # β Generated transcripts
β βββ cbMpZUz22cQ.txt # β More transcripts
βββ venv/ # β Python environment (don't touch)
βββ whisper_transcribe.py # β Script you run
βββ download_tracker.html # β Download tracker
π¨ Understanding .note.txt Files
You currently have 502 .note.txt files in your audio_files/ directory. These are error logs that tell you which videos failed to download automatically.
What's in your audio_files/ directory right now:
audio_files/
βββ _bB29g2ofI0.mp3 # β DUMMY file (20KB, not real audio)
βββ _bB29g2ofI0.note.txt # β ERROR LOG for this video
βββ _HnN44SoAP8.mp3 # β DUMMY file (20KB, not real audio)
βββ _HnN44SoAP8.note.txt # β ERROR LOG for this video
βββ ... (500 more pairs)
What the .note.txt files contain:
Failed to download audio for: https://www.youtube.com/watch?v=_bB29g2ofI0
Created dummy audio file on 2025-07-06 16:36:27.904863
This video has been flagged for manual processing.
What the dummy MP3 files are:
- Size: About 20KB each
- Content: Not real audio, just placeholder files
- Purpose: System creates these to track failed downloads
π What You Need to Do
Replace dummy files with real MP3 files:
- Use the download tracker (
download_tracker.html) to download real MP3 files - Save over the dummy files with the same filename
- The .note.txt files will be automatically cleaned up when processing succeeds
Example:
# You have this dummy file:
audio_files/_bB29g2ofI0.mp3 (20KB dummy file)
audio_files/_bB29g2ofI0.note.txt (error log)
# Download real audio from YouTube as MP3
# Save it as: audio_files/_bB29g2ofI0.mp3 (replaces dummy file)
# Run processing:
python3 whisper_transcribe.py
# System will:
# Process the real MP3 file
# Create transcripts/_bB29g2ofI0.txt
# Clean up the .note.txt file automatically
π Summary of Current Situation
- 502 videos failed automatic download
- 502 .note.txt files = error logs telling you which videos failed
- 502 dummy MP3 files = 20KB placeholder files (not real audio)
- You need to manually download 502 real MP3 files to replace the dummies
- Use
download_tracker.htmlto track your progress
π¨ Common Issues and Solutions
"Command not found"
# If you get "command not found", check you're in the right directory:
pwd
# Should show: /Users/bthaile/gitrepos/opteee
# Navigate to correct directory:
cd /Users/bthaile/gitrepos/opteee
"No module named..."
# If you get module errors, activate the virtual environment:
source venv/bin/activate
# You should see (venv) at the start of your prompt
"No files to process"
# Check if your MP3 files are in the right place:
ls audio_files/
# Files should be named like: oOyjSHIJSPs.mp3
"Permission denied"
# If you get permission errors, try:
chmod +x whisper_transcribe.py
π±οΈ Copy-Paste Commands
For quick access, here are the exact commands to copy:
Process New MP3 Files:
cd /Users/bthaile/gitrepos/opteee
source venv/bin/activate
python3 whisper_transcribe.py
Check What Files You Have:
cd /Users/bthaile/gitrepos/opteee
ls audio_files/
ls transcripts/
Run Complete Pipeline:
cd /Users/bthaile/gitrepos/opteee
source venv/bin/activate
python3 run_pipeline.py --step transcripts
π Terminal Basics
Essential Commands:
pwd- Shows current directoryls- Lists files in current directorycd- Changes directorycd ..- Goes up one directoryclear- Clears terminal screen
Keyboard Shortcuts:
Cmd + C- Copy textCmd + V- Paste textCmd + T- New terminal tabCmd + W- Close terminal tabβ(Up arrow) - Previous commandTab- Auto-complete file/folder names
π§ When You Need Help
Check if everything is working:
cd /Users/bthaile/gitrepos/opteee
source venv/bin/activate
python3 --version
# Should show: Python 3.9.6 or similar
See what Python packages are installed:
cd /Users/bthaile/gitrepos/opteee
source venv/bin/activate
pip list
# Shows all installed packages
If something breaks:
cd /Users/bthaile/gitrepos/opteee
./setup.sh
# Re-runs the setup script
π Summary
You only need to remember 3 commands:
cd /Users/bthaile/gitrepos/opteee- Go to projectsource venv/bin/activate- Load Python packagespython3 whisper_transcribe.py- Process MP3 files
Every time you download MP3 files, just run these 3 commands in Terminal!
The system handles everything else automatically. No complex configuration needed!