Privacy Screen Client

Describes how to use the client binary.

This release includes a PrivacyScreen client that can be used to quickly send audio/transcripts to the server. This reads audio files in WAV (PCM16SLE) format and transcripts in the JSON format, you can see examples for txt and json files:

Jack and Jill went up to 224 North Hill drive to fetch a pail of water. Jack fell down broke his crown and Jill called 4125555555.
{
    "utterances": [
        {
            "start_time_ms": 30,
            "duration_ms": 4230,
            "audio_channel": 0,
            "words": [
                {
                    "start_time_ms": 30,
                    "duration_ms": 390,
                    "text": "Jack"
                },
                {
                    "start_time_ms": 420,
                    "duration_ms": 120,
                    "text": "and"
                },
                {
                    "start_time_ms": 540,
                    "duration_ms": 240,
                    "text": "Jill"
                },
                {
                    "start_time_ms": 780,
                    "duration_ms": 240,
                    "text": "went"
                },
                {
                    "start_time_ms": 1020,
                    "duration_ms": 150,
                    "text": "up"
                },
                {
                    "start_time_ms": 1170,
                    "duration_ms": 60,
                    "text": "to"
                },
                {
                    "start_time_ms": 1230,
                    "duration_ms": 1080,
                    "text": "224"
                },
                {
                    "start_time_ms": 2310,
                    "duration_ms": 300,
                    "text": "North"
                },
                {
                    "start_time_ms": 2610,
                    "duration_ms": 150,
                    "text": "Hill"
                },
                {
                    "start_time_ms": 2760,
                    "duration_ms": 300,
                    "text": "drive"
                },
                {
                    "start_time_ms": 3060,
                    "duration_ms": 90,
                    "text": "to"
                },
                {
                    "start_time_ms": 3150,
                    "duration_ms": 270,
                    "text": "fetch"
                },
                {
                    "start_time_ms": 3420,
                    "duration_ms": 60,
                    "text": "a"
                },
                {
                    "start_time_ms": 3480,
                    "duration_ms": 270,
                    "text": "pail"
                },
                {
                    "start_time_ms": 3750,
                    "duration_ms": 120,
                    "text": "of"
                },
                {
                    "start_time_ms": 3870,
                    "duration_ms": 390,
                    "text": "water."
                }
            ]
        },
        {
            "start_time_ms": 9300,
            "duration_ms": 5324,
            "audio_channel": 1,
            "words": [
                {
                    "start_time_ms": 9300,
                    "duration_ms": 420,
                    "text": "Jack"
                },
                {
                    "start_time_ms": 9720,
                    "duration_ms": 210,
                    "text": "fell"
                },
                {
                    "start_time_ms": 9930,
                    "duration_ms": 420,
                    "text": "down"
                },
                {
                    "start_time_ms": 10410,
                    "duration_ms": 270,
                    "text": "broke"
                },
                {
                    "start_time_ms": 10680,
                    "duration_ms": 150,
                    "text": "his"
                },
                {
                    "start_time_ms": 10830,
                    "duration_ms": 450,
                    "text": "crown"
                },
                {
                    "start_time_ms": 11310,
                    "duration_ms": 180,
                    "text": "and"
                },
                {
                    "start_time_ms": 11490,
                    "duration_ms": 210,
                    "text": "Jill"
                },
                {
                    "start_time_ms": 11700,
                    "duration_ms": 330,
                    "text": "called"
                },
                {
                    "start_time_ms": 12030,
                    "duration_ms": 2594,
                    "text": "4125555555."
                }
            ]
        }
    ]
}

Examples of client calls

There are several ways the client interacts with the server. These examples are always run from the same path as the client binary is. When in doubt, run ./privacy-screen-gprc-client -h to get more information the parameters needed to run the client.

Redact Text

./privacy-screen-grpc-client redact-text \
        --insecure \
        --model-id general \
        --input-text input.txt \
        --output-result redacted_token.json

Redact Transcript

./privacy-screen-grpc-client redact-transcript \
        --insecure \
        --model-id general \
        --input-transcript testdata/input.json \
        --output-transcript redacted_output.json

Redact Transcribed Audio

./privacy-screen-grpc-client redact-transcribed-audio \
        --insecure \
        --model-id general \
        --input-audio testdata/input.wav \
        --input-transcript testdata/input.json \
        --output-audio redacted_output.wav \
        --output-transcript redacted_output.json \
        --timeout 5m

Transcribe and Redact

./privacy-screen-grpc-client transcribe-and-redact \
        --insecure \
        --model-id en_US \
        --input-audio testdata/input.wav \
        --output-audio redacted_output.wav \
        --output-transcript redacted_output.json \
        --output-unredacted-transcript unredacted_output.json \
        --timeout 5m