Prepend a spoken AI disclaimer to deep-fake audio
Problem/motivation
Where visual disclosure is not possible, the Code wants "a short audible disclaimer in plain and simple natural language" at the start of an audio deep fake, in the language of the content or in English. Long or live audio also needs reminders at regular intervals and after interruptions (Measures 1.1 and 1.2.3). An earcon alone is allowed only together with awareness measures, until the EU task force agrees a common audio signal.
Proposed resolution
A render job for #66 (closed):
- A disclaimer clip per language: uploaded per langcode in the settings, or generated once with the text-to-speech operation of drupal/ai when that module is enabled. Default text "This audio was generated by AI.", translatable.
- Normalise the sample rate and channels, then concatenate the disclaimer, a short pause and the content.
- Reminders for recordings longer than N seconds (default 300): an earcon or the disclaimer again, mixed in at computed offsets.
- Tags:
TXXXframesai_digital_source_typeandcommentfor MP3, MP4 tags for M4A, Vorbis comments for FLAC and Ogg. - The audio player shows the icon as well. That is part of the player issue in #56 (closed).
Tested with FFmpeg 4.4: a 2 s disclaimer, 0.4 s of silence and a 10 s file give 12.4 s, and both TXXX frames are written.
ffmpeg -i disclaimer-en.wav -f lavfi -t 0.4 -i anullsrc=r=44100:cl=stereo -i in.mp3 -filter_complex "[0:a]aformat=sample_rates=44100:channel_layouts=stereo[d];[2:a]aformat=sample_rates=44100:channel_layouts=stereo[c];[d][1:a][c]concat=n=3:v=0:a=1[a]" -map "[a]" -id3v2_version 3 -metadata comment="AI-generated audio" -metadata ai_digital_source_type="http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia" out.mp3Open question: offer audiowmark (a GPL command-line tool) as an optional inaudible watermark, for sites that are themselves providers?
Remaining tasks
- Disclaimer clips per language: upload and optional text-to-speech
- Concat job and reminders
- Tags per format
- Test: output duration and tags on a fixture file
- Docs
User interface changes
Disclaimer settings per language.
API changes
None.
Data model changes
None. The clips are managed files referenced from config.
Part of #56 (closed).