A service that gives timestamped highlights of an audio clip
Uses:
- Mozilla DeepSpeech for VAD and speech-to-text translation
- Microsoft ProphetNet for text summarization
sudo apt install sox ffmpeg
pip install torch==1.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
mkdir models/
curl -L https://github.com/mozilla/DeepSpeech/releases/download/v0.7.3/deepspeech-0.7.3-models.pbmm --output models/deepspeech-0.7.3-models.pbmm
curl -L https://github.com/mozilla/DeepSpeech/releases/download/v0.7.3/deepspeech-0.7.3-models.scorer --output models/deepspeech-0.7.3-models.scorer
python download_models.py
Run as Flask API
export FLASK_APP=main.py
flask run
POST /request
Parameters:
- url: A download URL from Acast for the podcast
- minute_increment: How often to timestamp
curl -X POST -d '{"url": "<URL>", "minute_increment": "<INT>"}' -H 'Content-Type: application/json' http://localhost:5000/request
Response
"{request_id: <UUID>}"
GET /stream/<request-id>
curl -X GET http://localhost:5000/stream/<request-id>
Response
Either let it stream to your terminal or handle with JS Stream API