Skip to content

Instantly share code, notes, and snippets.

@idlesign
Created May 31, 2023 01:56
Show Gist options
  • Save idlesign/23797adae3a813f85718cea12e708fd1 to your computer and use it in GitHub Desktop.
Save idlesign/23797adae3a813f85718cea12e708fd1 to your computer and use it in GitHub Desktop.
from os import getuid
from time import sleep
_uid = getuid()
p_out = open(f'/tmp/audacity_script_pipe.to.{_uid}', 'w')
p_in = open(f'/tmp/audacity_script_pipe.from.{_uid}', 'r')
def write(cmd: str):
print(f'written: {cmd}')
p_out.write(f'{cmd}\n')
p_out.flush()
write('Record1stChoice')
while True:
sleep(1.5)
write('AddLabelPlaying')
write('Paste')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment