Last active
March 27, 2025 09:43
-
-
Save funivan/c582d53c4afc9805f71e3e17f3b0f2d2 to your computer and use it in GitHub Desktop.
Autio to text converter
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/zsh | |
| url="$1"; | |
| if [ -z "$url" ]; then | |
| echo "Please provide a url to download the mp3 files"; | |
| exit 1; | |
| fi | |
| mkdir -p models | |
| mkdir -p audio | |
| model_file=models/ggml-small.bin | |
| if [[ ! -f "$model_file" ]]; then | |
| echo "Downloading the model file ${model_file}" | |
| curl -LJ https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin \ | |
| --output $model_file | |
| fi | |
| rm -rf "audio/1.mp3" | |
| curl "$url" > audio/1.mp3; | |
| docker run \ | |
| -v $PWD/models:/app/models \ | |
| -v $PWD/audio:/app/audio \ | |
| ghcr.io/appleboy/go-whisper:latest \ | |
| --model "/app/$model_file" \ | |
| --language en \ | |
| --audio-path /app/audio/1.mp3 | |
| cat audio/1.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment