Automatically redact PII from audio and video files in minutes with Python.
Companion repo for the blog Automatically redact PII from audio and video with Python.
- Install the AssemblyAI Python SDK
- Set your AssemblyAI API key as an environment variable (you can get a key here)
# Mac/Linux:
export ASSEMBLYAI_API_KEY=<YOUR_KEY>
# Windows:
set ASSEMBLYAI_API_KEY=<YOUR_KEY>
- Run
python main.py
to print a redacted transcript and URL for redacted version of a hard-coded audio file - (Optional) Install
termcolor
withpip install termcolor
, and then runpython compare.py
to print out a comparison of the unredacted and redacted transripts.