Created
February 28, 2023 16:27
-
-
Save mknz/647f310baac209b6e142aa10e956e807 to your computer and use it in GitHub Desktop.
Record audio, transcribe and copy to clipboard
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())" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment