Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhyde/1e4b90fb1fb9f8bc14371a28ce86a815 to your computer and use it in GitHub Desktop.
Save bhyde/1e4b90fb1fb9f8bc14371a28ce86a815 to your computer and use it in GitHub Desktop.
Script to grant the Voice Desktop application access to the microphone.
#!/bin/bash
set -e -u -o pipefail
# Grant this Voice Desktop access to the user's microphone.
app='com.jerrkawz.voiceDesktop'
svc='kTCCServiceMicrophone'
# Modifying user's Transparency, Consent, and Control settings, e.g. TCC
access_db="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
# By adding this row. The schema for this row changes often)
# so this shell cmd interesting: sqlite3 "$access_db" "select * from access where service == 'kTCCServiceMicrophone';"
TIMESTAMP=$(date +%s)
row="VALUES('$svc','$app',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,'$TIMESTAMP')"
# using sql lite
sqlite3 "$access_db" "insert or replace into access $row ;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment