Skip to content

Instantly share code, notes, and snippets.

@6david9
Last active April 11, 2023 09:52
Show Gist options
  • Select an option

  • Save 6david9/244f92b912268a8020e5e191bb2437d8 to your computer and use it in GitHub Desktop.

Select an option

Save 6david9/244f92b912268a8020e5e191bb2437d8 to your computer and use it in GitHub Desktop.

Revisions

  1. 6david9 revised this gist Apr 11, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion whisper.sh
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ if ! command -v whisper &> /dev/null
    then
    echo "whisper could not be found"
    echo "installing whisper"
    pip3 install whisper
    pip3 install openai-whisper
    fi

    if [[ ! -e a.m4a ]]; then
  2. 6david9 revised this gist Apr 11, 2023. 1 changed file with 0 additions and 7 deletions.
    7 changes: 0 additions & 7 deletions whisper.sh
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,5 @@
    #!/bin/bash

    if ! command -v tmux &> /dev/null
    then
    echo "tmux could not be found"
    echo "installing tmux"
    apt install tmux -y
    fi

    if ! command -v ffmpeg &> /dev/null
    then
    echo "ffmpeg could not be found"
  3. 6david9 revised this gist Apr 11, 2023. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions whisper.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,26 @@
    #!/bin/bash

    if ! command -v tmux &> /dev/null
    then
    echo "tmux could not be found"
    echo "installing tmux"
    apt install tmux -y
    fi

    if ! command -v ffmpeg &> /dev/null
    then
    echo "ffmpeg could not be found"
    echo "installing ffmpeg"
    apt install ffmpeg -y
    fi

    if ! command -v whisper &> /dev/null
    then
    echo "whisper could not be found"
    echo "installing whisper"
    pip3 install whisper
    fi

    if [[ ! -e a.m4a ]]; then
    wget https://jt.ximalaya.com//GKwRIasIBG6iAWNIJQILpaF9.m4a\?channel\=rss\&album_id\=25534957\&track_id\=624147502\&uid\=1621911\&jt\=https://audio.xmcdn.com/storages/9c5b-audiofreehighqps/EA/BB/GKwRIasIBG6iAWNIJQILpaF9.m4a -O a.m4a
    fi
  4. 6david9 revised this gist Apr 11, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion whisper.sh
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,4 @@ if [[ ! -e a.m4a ]]; then
    wget https://jt.ximalaya.com//GKwRIasIBG6iAWNIJQILpaF9.m4a\?channel\=rss\&album_id\=25534957\&track_id\=624147502\&uid\=1621911\&jt\=https://audio.xmcdn.com/storages/9c5b-audiofreehighqps/EA/BB/GKwRIasIBG6iAWNIJQILpaF9.m4a -O a.m4a
    fi

    whisper --language Chinese --model large --device cuda a.m4a
    whisper --language Chinese --model small --device cuda a.m4a
  5. 6david9 created this gist Apr 11, 2023.
    7 changes: 7 additions & 0 deletions whisper.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/bash

    if [[ ! -e a.m4a ]]; then
    wget https://jt.ximalaya.com//GKwRIasIBG6iAWNIJQILpaF9.m4a\?channel\=rss\&album_id\=25534957\&track_id\=624147502\&uid\=1621911\&jt\=https://audio.xmcdn.com/storages/9c5b-audiofreehighqps/EA/BB/GKwRIasIBG6iAWNIJQILpaF9.m4a -O a.m4a
    fi

    whisper --language Chinese --model large --device cuda a.m4a