Skip to content

Instantly share code, notes, and snippets.

@matteocaberlotto
Created February 16, 2024 15:51
Show Gist options
  • Save matteocaberlotto/f44e8e3483a30cdef699765133727b19 to your computer and use it in GitHub Desktop.
Save matteocaberlotto/f44e8e3483a30cdef699765133727b19 to your computer and use it in GitHub Desktop.
Deepspeech transcription test
.DEFAULT_GOAL := help
SHELL := /bin/sh
help: ## Display help message
@echo "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\1:\2/' | column -c2 -t -s :)"
venv: ## Create virtualenv if not exists
test -d .venv || python3 -m venv .venv
source: venv ## Source viirtualvenvv
. .venv/bin/activate
install: source ## Install required packages
python3 -m pip install deepspeech
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.pbmm
curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/deepspeech-0.9.3-models.scorer
transcribe: ## Transcribe an audio file
deepspeech --model deepspeech-0.9.3-models.pbmm --scorer deepspeech-0.9.3-models.scorer --audio ${FILE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment