Deepgram Data Handling
Contents
Overview
Best practices for handling audio data and transcriptions with Deepgram, including secure upload with encryption, PII redaction, data retention policies, GDPR compliance, and audit logging.
Prerequisites
- Understanding of data protection regulations
- Cloud storage configured (S3/GCS)
- Encryption capabilities (KMS)
- Data retention policies defined
Instructions
Step 1: Implement Secure Upload
Validate audio format (WAV/MP3/FLAC headers), encrypt with AES-256-GCM via KMS data keys, upload to S3 with server-side encryption, and set expiration metadata.
Step 2: Configure PII Redaction
Apply regex-based redaction for SSN, credit card, phone, email, and date of birth patterns. Also use Deepgram's built-in redact option for PCI/SSN/numbers.
Step 3: Set Up Data Retention
Define policies: standard (30 days), legal hold (7 years), HIPAA (6 years). Auto-enforce retention by scanning S3 objects and deleting expired items in batches.
Step 4: Implement GDPR Right to Erasure
Process deletion requests by removing transcripts from database, audio files from S3, and user metadata. Log all deletions for audit. Support data export for portability.
Step 5: Enable Audit Logging
Log all data access events with tamper-evident hashing. Forward to external SIEM if configured.
See detailed implementation for advanced patterns.
Output
- Secure audio upload with KMS encryption
- PII redaction (regex + Deepgram built-in)
- Automated data retention enforcement
- GDPR erasure and data export
- Tamper-evident audit logging
Error Handling
| Issue |
Cause |
Solution |
| Invalid audio format |
Wrong file type |
Validate magic bytes before upload |
| Encryption failure |
KMS unavailable |
Retry with backoff, alert ops |
| Retention miss |
Cron failure |
Monitor retention job, add alerts |
| GDPR incomplete |
Partial deletion |
Transaction-based deletion with rollback |
Examples
Data Lifecycle
Upload -> Process -> Store -> Retain -> Archive -> Delete
| | | | | |
Encrypt Transcribe Save Review Compress Secure Delete
Compliance Requirements
| Regulation |
Key Requirements |
| GDPR |
Data minimization, right to deletion, consent |
| HIPAA |
PHI protection, access controls, audit logs |
| SOC 2 |
Security controls, availability, confidentiality |
| PCI DSS |
Data encryption, access logging |
Resources
1---2name: deepgram-data-handling3description: |4 Implement audio data handling best practices for Deepgram integrations.5 Use when managing audio file storage, implementing data retention policies,6 or ensuring GDPR/HIPAA compliance for transcription data.7 Trigger with phrases like "deepgram data", "audio storage", "transcription data",8 "deepgram GDPR", "deepgram HIPAA", "deepgram privacy".9allowed-tools: Read, Write, Edit, Bash(kubectl:*), Bash(curl:*)10version: 1.0.011license: MIT12author: Jeremy Longshore <jeremy@intentsolutions.io>13compatible-with: claude-code, codex, openclaw14metadata:15 source: https://skillmd.com/skills/micsapp/deepgram-data-handling16---1718# Deepgram Data Handling1920## Contents21- [Overview](#overview)22- [Prerequisites](#prerequisites)23- [Instructions](#instructions)24- [Output](#output)25- [Error Handling](#error-handling)26- [Examples](#examples)27- [Resources](#resources)2829## Overview30Best practices for handling audio data and transcriptions with Deepgram, including secure upload with encryption, PII redaction, data retention policies, GDPR compliance, and audit logging.3132## Prerequisites33- Understanding of data protection regulations34- Cloud storage configured (S3/GCS)35- Encryption capabilities (KMS)36- Data retention policies defined3738## Instructions3940### Step 1: Implement Secure Upload41Validate audio format (WAV/MP3/FLAC headers), encrypt with AES-256-GCM via KMS data keys, upload to S3 with server-side encryption, and set expiration metadata.4243### Step 2: Configure PII Redaction44Apply regex-based redaction for SSN, credit card, phone, email, and date of birth patterns. Also use Deepgram's built-in `redact` option for PCI/SSN/numbers.4546### Step 3: Set Up Data Retention47Define policies: standard (30 days), legal hold (7 years), HIPAA (6 years). Auto-enforce retention by scanning S3 objects and deleting expired items in batches.4849### Step 4: Implement GDPR Right to Erasure50Process deletion requests by removing transcripts from database, audio files from S3, and user metadata. Log all deletions for audit. Support data export for portability.5152### Step 5: Enable Audit Logging53Log all data access events with tamper-evident hashing. Forward to external SIEM if configured.5455See [detailed implementation](${CLAUDE_SKILL_DIR}/references/implementation.md) for advanced patterns.5657## Output58- Secure audio upload with KMS encryption59- PII redaction (regex + Deepgram built-in)60- Automated data retention enforcement61- GDPR erasure and data export62- Tamper-evident audit logging6364## Error Handling65| Issue | Cause | Solution |66|-------|-------|----------|67| Invalid audio format | Wrong file type | Validate magic bytes before upload |68| Encryption failure | KMS unavailable | Retry with backoff, alert ops |69| Retention miss | Cron failure | Monitor retention job, add alerts |70| GDPR incomplete | Partial deletion | Transaction-based deletion with rollback |7172## Examples7374### Data Lifecycle75```76Upload -> Process -> Store -> Retain -> Archive -> Delete77 | | | | | |78Encrypt Transcribe Save Review Compress Secure Delete79```8081### Compliance Requirements82| Regulation | Key Requirements |83|------------|------------------|84| GDPR | Data minimization, right to deletion, consent |85| HIPAA | PHI protection, access controls, audit logs |86| SOC 2 | Security controls, availability, confidentiality |87| PCI DSS | Data encryption, access logging |8889## Resources90- [Deepgram Security](https://deepgram.com/security)91- [GDPR Compliance Guide](https://developers.deepgram.com/docs/gdpr)92- [HIPAA Compliance](https://deepgram.com/hipaa)