Last active
April 11, 2023 09:52
-
-
Save 6david9/244f92b912268a8020e5e191bb2437d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 openai-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 | |
whisper --language Chinese --model small --device cuda a.m4a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment