Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
| #!/bin/zsh | |
| # Tiktok speech to text parser | |
| # by hugeblank, April 2022 | |
| # API endpoint & oneshot reading and playing discovered by @scanlime | |
| # https://twitter.com/scanlime/status/1512288857596653568 | |
| # First argument - string of text to read | |
| # Second argument - voice to use | |
| # Usage examples: | 
| #!/bin/sh | |
| # Set your pushbullet access token here: | |
| PUSHBULLET_ACCESS_TOKEN=SPECIFY_ACCESS_TOKEN_HERE | |
| # -- END of user configurable variables. -- | |
| PUSHBULLET_API_PUSH=https://api.pushbullet.com/v2/pushes | |
| curl --header "Authorization: Bearer $PUSHBULLET_ACCESS_TOKEN" \ | |
| -o /dev/null \ | 
| #!/usr/bin/python | |
| import sys | |
| import os, shutil | |
| import subprocess | |
| import os.path | |
| from datetime import datetime | |
| import time | |
| ######################## Functions ######################### | 
| # Last updated May, 2024 for Apple silicon Macs | |
| # Install Homebrew if you don't already have it: https://brew.sh | |
| # install nano from homebrew | |
| brew install nano nanorc | |
| # update your nanorc file | |
| echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc | |
| # close and re-open your terminal and you'll have syntax highlighting | 
| #!/bin/sh -xe | |
| API_KEY="YOUR_API_KEY_GOES_HERE" | |
| FPS="10" | |
| VLC_PATH="/Applications/VLC.app/Contents/MacOS/VLC" | |
| # I don't know how this'll behave on multimon, so you might want to hard-code. | |
| # INRES='1440x900' | |
| INRES=$(osascript -e 'tell application "Finder" to get bounds of window of desktop'|sed 's/, /x/g'|cut -f3- -dx) | |
| OUTRES='1280x800' | |
| # You can change this to record microphone or something else, from man soxformat (under coreaudio): |