This file contains hidden or 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 | |
# Internet Archive File Mounting Tool | |
usage() { | |
echo "Usage:" | |
echo "1. Create a file with the archive.org ID (e.g., 'test.ia' for https://archive.org/details/test)." | |
echo "2. Run this script." | |
echo "It will mount each '.ia' file, list its contents, and append directory information to the corresponding file." | |
} |
This file contains hidden or 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 | |
# Associative arrays for mapping IDs to model and vocoder names | |
declare -A model_ids=( | |
[12]="tts_models/en/ljspeech/tacotron2-DDC_ph" | |
[15]="tts_models/en/ljspeech/tacotron2-DCA" | |
) | |
declare -A vocoder_ids=( | |
[4]="vocoder_models/en/ljspeech/multiband-melgan" |
This file contains hidden or 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 | |
# requires https://github.com/coqui-ai/TTS | |
# Associative arrays for mapping IDs to model and vocoder names | |
declare -A model_ids=( | |
[11]="tts_models/en/ljspeech/tacotron2-DDC" | |
[12]="tts_models/en/ljspeech/tacotron2-DDC_ph" | |
[15]="tts_models/en/ljspeech/tacotron2-DCA" | |
[20]="tts_models/en/ljspeech/neural_hmm" |
This file contains hidden or 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 | |
# Uses mimic https://github.com/MycroftAI/mimic1?tab=readme-ov-file to speak | |
# optionally uses aplay https://linux.die.net/man/1/aplay to speak then delete the output file | |
# Set default values | |
VOICE='slt_hts' | |
WAVFILE="$TEMP/$(date "+%Y%m%d.%H%M%S")-tts.wav" | |
TEXT='' | |
TEXTFILE='' |
This file contains hidden or 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 | |
# Function to parse command line arguments | |
parse_args() { | |
while [[ $# -gt 0 ]]; do | |
case $1 in | |
-u=*|--url=*) | |
URL="${1#*=}" | |
shift # past argument=value | |
;; |
This file contains hidden or 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 | |
# Parse command-line options | |
while getopts ":f:" opt; do | |
case ${opt} in | |
f) | |
file=$OPTARG | |
;; | |
\?) |
This file contains hidden or 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 | |
# NOTE this is actually using whisper-wrapper.sh: https://gist.github.com/vijinho/ad9bd80c990a803efef7f96ae3e7ee98 | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 [-m | --media-directory <directory>] [-a | --transcription-args \"<arguments>\"]" | |
echo "Defaults: -m `pwd`" | |
exit 1 | |
} |
This file contains hidden or 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 | |
# Default values | |
MODEL="$HOME/src/whisper.cpp/models/ggml-large-v3-turbo-q5_0.bin" | |
INPUT_FILE="" | |
OUTPUT_FILE="$TEMP/whisper-$(date "+%Y%m%d%H%M%S").wav" | |
WHISPER_ARGS="-m $MODEL -l en -t 12 -pp -pc -otxt -ovtt -osrt" | |
# Function to display usage information | |
usage() { |
This file contains hidden or 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
# ./dav.sh 8090 /mnt/data/joplin | |
PORT=$1 | |
DATA_DIR=$2 | |
NAME=`basename $DATA_DIR` | |
CACHE_DIR=/var/cache/dav/$NAME | |
#rm -fR $CACHE_DIR | |
mkdir -p $CACHE_DIR | |
chmod -fR 777 $CACHE_DIR | |
/home/linuxbrew/.linuxbrew/bin/rclone serve webdav --htpasswd $DATA_DIR/.htpasswd --addr :$PORT $DATA_DIR --buffer-size 512M --dir-cache-time 15m --cache-dir $CACHE_DIR --vfs-cache-mode full --vfs-cache-max-size 4G --no-checksum --vfs-case-insensitive --vfs-disk-space-total-size 4G 2>&1 > /var/log/rclone.log & | |
exit 0 |
This file contains hidden or 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
# ./dav.sh 8090 /mnt/data/joplin | |
PORT=$1 | |
DATA_DIR=$2 | |
NAME=`basename $DATA_DIR` | |
CACHE_DIR=/var/cache/dav/$NAME | |
#rm -fR $CACHE_DIR | |
mkdir -p $CACHE_DIR | |
chmod -fR 777 $CACHE_DIR | |
/home/linuxbrew/.linuxbrew/bin/rclone serve webdav --user $NAME --pass $NAME --addr :$PORT $DATA_DIR --buffer-size 512M --dir-cache-time 15m --cache-dir $CACHE_DIR --vfs-cache-mode full --vfs-cache-max-size 4G --vfs-cache-max-size 1G --no-checksum --vfs-case-insensitive --vfs-disk-space-total-size 4G 2>&1 > /var/log/rclone.log & | |
exit 0 |
NewerOlder