Last active
March 5, 2023 08:28
-
-
Save varenc/8cae8f19fede79f63b84cc85f602f382 to your computer and use it in GitHub Desktop.
Revisions
-
varenc revised this gist
Dec 8, 2022 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,13 @@ #!/bin/zsh ################### # Save all of your Siri recordings on macOS. The recordings will be saved as .wav files in $SIRI_SAVE_DIR # # USAGE: # $ wget https://gist.github.com/varenc/8cae8f19fede79f63b84cc85f602f382/raw/siri_recording_save.sh # $ chmod +x siri_recording_save.sh # $ ./siri_recording_save.sh # ################### SIRI_SAVE_DIR="/tmp/siri_recordings" -
varenc revised this gist
Dec 8, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,4 +18,4 @@ echo "Watching Siri directory ($SIRI_SOURCE_DIR) now...all new Siri recordings w # and save them for later. Siri deletes the files soon after they are done recording but our copies will be saved # You will however see a 'No such file or directory' error in the console when Siri is done with each recording. # But check $SIRI_SAVE_DIR and they should be there fswatch -r "$SIRI_SAVE_DIR" | grep --line-buffered '.wav$' | xargs -n1 -I {} cp -v {} "$SIRI_SAVE_DIR" -
varenc created this gist
Dec 8, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/bin/zsh ################### ### Save all of your Siri recordings on macOS. The recordings will be saved as .wav files in $SIRI_SAVE_DIR ################### SIRI_SAVE_DIR="/tmp/siri_recordings" SIRI_SOURCE_DIR="$HOME/Library/Assistant" # You shouldn't need to change this if ! which fswatch > /dev/null ; then echo 'The util 'fswatch' is not installed! Install it with `brew install fswatch`'; exit 1; fi echo "Watching Siri directory ($SIRI_SOURCE_DIR) now...all new Siri recordings will be copied and saved to $SIRI_SAVE_DIR" [ -d "$SIRI_SAVE_DIR" ] || mkdir "$SIRI_SAVE_DIR" # Watch the siri directory for new .wav files. These are streamed to disk as they are recorded. # Once Siri is done the files are deleted, but since we are watching the directory we can copy them immediately # and save them for later. Siri deletes the files soon after they are done recording but our copies will be saved # You will however see a 'No such file or directory' error in the console when Siri is done with each recording. # But check $SIRI_SAVE_DIR and they should be there fswatch -r $HOME/Library/Assistant | grep --line-buffered '.wav$' | xargs -n1 -I {} cp -v {} "$SIRI_SAVE_DIR"