Skip to content

Instantly share code, notes, and snippets.

@ronaldbradford
Last active May 25, 2024 21:43
Show Gist options
  • Save ronaldbradford/3fa4331b39312bd1446fea9b4bed8a3f to your computer and use it in GitHub Desktop.
Save ronaldbradford/3fa4331b39312bd1446fea9b4bed8a3f to your computer and use it in GitHub Desktop.
Whisper Example to extract text transcription from YouTube
# https://github.com/openai/whisper
pip install -U openai-whisper
brew install ffmpeg

# https://formulae.brew.sh/formula/youtube-dl. (Deprecated, owner shutdown but still works)
brew install youtube-dl


youtube-dl -x https://youtu.be/Nx-X4hVQGyQ
mv Founder\ University\ _\ Official\ Podcast\ Trailer-Nx-X4hVQGyQ.m4a FounderUniversityIntro.m4
whisper FounderUniversityIntro.m4a --language English --model medium

# There does not seem to be an option to suppress the message
@ UserWarning: FP16 is not supported on CPU; using FP32 instead warnings.warn("FP16 is not supported on CPU; using FP32 instead")
# --fp16 FALSE and --fp16 FP32 don't work, --fp32 is an invalid arg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment