This file contains 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 | |
WORKDIR=/tmp/whisper | |
rm -rf $WORKDIR | |
mkdir $WORKDIR | |
URL=\'$1\' | |
SAVEFILE=\'$WORKDIR/tmp.3gpp\' | |
python -c "from pytube import YouTube; YouTube($URL).streams.first().download(filename=$SAVEFILE)" | |
ffmpeg -i $WORKDIR/tmp.3gpp -ar 16000 -ac 1 -c:a pcm_s16le $WORKDIR/tmp.wav &> /dev/null |
This file contains 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 | |
arecord -r 16000 -c 1 -f S16_LE -d 5 /tmp/tmp.wav &> /dev/null | |
./main -m ./models/ggml-base.bin -l en -f /tmp/tmp.wav -otxt -of /tmp/out &> /dev/null | |
python -c "import pyperclip; pyperclip.copy(open('/tmp/out.txt', 'r').read().replace('\n', ' ').strip())" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env python | |
"""Edit a file in the host nvim instance.""" | |
from __future__ import print_function | |
import os | |
import sys | |
from neovim import attach | |
args = sys.argv[1:] | |
if not args: |