Sub topic 13
Privacy, consent, and disclosing synthetic voices
This chapter assumes you can call the transcription and speech endpoints from earlier chapters and know how your app stores files and logs. Voice data is personal data, and a synthetic voice can mislead people. Both need design decisions before launch.
Why voice data needs care
A recording holds more than the words. It can identify a speaker, reveal health, accent, or mood, and capture other people in the room. Transcripts add searchable text on top of that. Treat both the audio and the text as sensitive.
Your app also sends audio to a third-party provider. Check three things in the provider's terms: whether submitted audio is retained, whether it is used for training, and whether you can request zero or limited retention. These settings differ by plan and change over time, so read the current policy instead of assuming.
Data flow map
Before writing consent text, trace where audio and text travel.
Each arrow to a provider is a disclosure of personal data. Each dotted line is a copy you must secure and eventually delete.
Consent and notice
Tell users, before recording starts, that:
- Audio is recorded and sent to named processors.
- Whether recordings or transcripts are kept, and for how long.
- They are talking to an AI system, if that is true.
Recording laws differ by region. Some places require every participant to agree to a recording. If your app transcribes meetings or calls, every person on the call is affected, not only the account holder. Ask a lawyer about your target markets. This chapter does not give legal advice.
Minimize and protect what you keep
- Delete uploaded audio as soon as transcription succeeds, unless you have a stated reason to keep it.
- Store transcripts with a retention period and enforce it with a scheduled job.
- Keep raw transcripts out of application logs. Log request IDs, durations, and error codes instead.
- Encrypt stored files and restrict access by role.
- Redact obvious identifiers such as card numbers before sending text on to other services when you can.
The following example removes the temporary file whether or not transcription succeeds:
import os
from openai import OpenAI
client = OpenAI()
def transcribe_and_delete(path):
try:
with open(path, "rb") as audio_file:
return client.audio.transcriptions.create(
model="whisper-1",
file=audio_file,
).text
finally:
if os.path.exists(path):
os.remove(path)If you need the audio for retries, delete it after the final attempt instead.
Disclosing synthetic voices
Text-to-speech output sounds human. Listeners should not be misled into thinking a person is speaking.
- Say at the start that the voice is AI-generated, for example "You're speaking with an automated assistant."
- Use a stock voice from the provider. Provider usage policies generally require disclosure that the voice is synthetic, so confirm the current wording.
- Do not imitate a real person's voice without their explicit permission. Impersonation and fraud are the main abuse cases.
- Do not present synthetic speech as a real recording of someone saying something they did not say.
For phone or call-center uses, also check whether local rules govern automated or artificial voices.
Checklist before launch
| Question | Evidence to have |
|---|---|
| Do users know they are recorded? | Consent screen or spoken notice |
| Do you know each processor's retention? | Reviewed provider terms |
| Is audio deleted on schedule? | Retention job and test |
| Are transcripts absent from logs? | Log review |
| Is the voice disclosed as synthetic? | Opening message or label |
Exercise
Your voice assistant logs every transcript to your application logs for debugging. Name two problems with this and one change you would make.
Show answer
Logs usually have broader access and longer retention than the product database, so personal or sensitive speech spreads to people and systems that never agreed to it. Logs are also rarely covered by deletion requests, so you cannot honor them. Change: log only request IDs, durations, and error codes, and keep transcripts in a store with access control and a retention period.