Skip to content

Instantly share code, notes, and snippets.

@richbs
Last active February 7, 2023 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richbs/e5ee1ff427aaaf83e37c866b169631fe to your computer and use it in GitHub Desktop.
Save richbs/e5ee1ff427aaaf83e37c866b169631fe to your computer and use it in GitHub Desktop.
transcribe.py
# https://www.microsoft.com/store/productId/9PJPW5LDXLZ5
# choco install ffpmeg ptime
# pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116 whisper-ai
import whisper
model = whisper.load_model("base") # medium
result = model.transcribe("C:\\Users\\Rich Barrett-Small\\Music\\Sunday_Feature_-_Silent_Witness_-_John_Cage_Zen_and_Japan_m000kwm0_original.m4a")
print(result["text"])
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment