Skip to content

Instantly share code, notes, and snippets.

@mknz
Created February 28, 2023 16:28
Show Gist options
  • Save mknz/8fb841b6827f48f8163cf2baed21167e to your computer and use it in GitHub Desktop.
Save mknz/8fb841b6827f48f8163cf2baed21167e to your computer and use it in GitHub Desktop.

Revisions

  1. mknz revised this gist Feb 28, 2023. No changes.
  2. mknz created this gist Feb 28, 2023.
    8 changes: 8 additions & 0 deletions dl.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/bin/bash
    WORKDIR=/tmp/whisper
    rm -rf $WORKDIR
    mkdir $WORKDIR
    URL=\'$1\'
    SAVEFILE=\'$WORKDIR/tmp.3gpp\'
    python -c "from pytube import YouTube; YouTube($URL).streams.first().download(filename=$SAVEFILE)"
    ffmpeg -i $WORKDIR/tmp.3gpp -ar 16000 -ac 1 -c:a pcm_s16le $WORKDIR/tmp.wav &> /dev/null