How caggazzotti/long-form-speech-anonymization works
This research pipeline evaluates privacy protection against identifying speakers from long-form speech style. Its main workflow prepares utterance audio, transcribes it, paraphrases content, builds matched trials, and embeds and evaluates them; a parallel voice-anonymization workflow creates XTTS profiles and anonymized speech. README statements establish the high-level workflow; sampled source confirms several component behaviors. Unexcerpted modules are represented only where documented, so some internal links are intentionally omitted.
Main entry points: embed_trials_sluar.py SLUAR embedding · build_trials_from_utterances.py Trial construction · create_xtts_base_profiles.py XTTS base profiles · create_xtts_pseudo_profile.py Pseudo-speaker profile
Components 22
Audio preparation
- Segment audio
scripts/prepare_utterance_audio.py - Utterance WAVs
Voice anonymization
- XTTS base profiles
scripts/voice_anonymization/create_xtts_base_profiles.py - Pseudo-profile builder
scripts/voice_anonymization/build_pseudo_speaker_profiles.py - Pseudo-speaker profile
scripts/voice_anonymization/create_xtts_pseudo_profile.py - Batch voice anonymizer
scripts/voice_anonymization/anonymize_batch_xtts.py - Voice-anonymized audio
Content anonymization
- Whisper transcription
scripts/content_anonymization/whisper_transcribe.py - ASR utterances
- Paraphrase prompts
scripts/content_anonymization/generate_paraphrase_prompts.py - Response conversion
scripts/content_anonymization/paraphrase_responses_to_utterances.py - Anonymized text
Trials and evaluation
- Trial construction
scripts/content_anonymization/build_trials_from_utterances.py - Matched trials
scripts/content_anonymization/match_trials.py - Trial files
- SLUAR embedding
scripts/content_anonymization/embed_trials_sluar.py - Aligned similarity
scripts/content_anonymization/calculate_similarity_aligned.py - LDC evaluation
scripts/content_anonymization/evaluate_ldc_sluar.py - Matched evaluation
scripts/content_anonymization/evaluate_matched_trials.py
Other components
- Fisher data
- Paraphrase model
- XTTS synthesis
Connections 27
- Fisher data → Segment audio: provides audio
README.md - Segment audio → Utterance WAVs: writes segments
scripts/prepare_utterance_audio.py - Utterance WAVs → Whisper transcription: transcribes
README.md - Whisper transcription → ASR utterances: writes transcripts
scripts/content_anonymization/whisper_transcribe.py - ASR utterances → Paraphrase prompts: generates prompts
scripts/content_anonymization/generate_paraphrase_prompts.py - Paraphrase prompts → Paraphrase model: submits prompts
- Paraphrase model → Response conversion: returns responses
- Response conversion → Anonymized text: writes utterances
scripts/content_anonymization/paraphrase_responses_to_utterances.py - ASR utterances → Trial construction: builds trials
README.md - Anonymized text → Trial construction: builds trials
README.md - Trial construction → Trial files: writes trials
scripts/content_anonymization/build_trials_from_utterances.py - ASR utterances → Matched trials: pairs utterances
scripts/content_anonymization/match_trials.py - Anonymized text → Matched trials: pairs utterances
scripts/content_anonymization/match_trials.py - Matched trials → Trial files: writes matched trials
README.md - Trial files → SLUAR embedding: embeds trials
scripts/content_anonymization/embed_trials_sluar.py - SLUAR embedding → Aligned similarity: compares embeddings
- SLUAR embedding → LDC evaluation: evaluates baseline
README.md - SLUAR embedding → Matched evaluation: evaluates matched trials
- Fisher data → XTTS base profiles: reference audio
- XTTS base profiles → Pseudo-profile builder: builds profiles
README.md - XTTS base profiles → Pseudo-speaker profile: averages profiles
scripts/voice_anonymization/create_xtts_pseudo_profile.py - Pseudo-profile builder → Pseudo-speaker profile: creates per-speaker profiles
README.md - Pseudo-speaker profile → Batch voice anonymizer: loads profile
scripts/voice_anonymization/anonymize_batch_xtts.py - XTTS synthesis → Batch voice anonymizer: synthesizes speech
scripts/voice_anonymization/anonymize_batch_xtts.py - Batch voice anonymizer → Voice-anonymized audio: writes audio
scripts/voice_anonymization/anonymize_batch_xtts.py - Voice-anonymized audio → Whisper transcription: transcribes anonymized audio
README.md - Voice-anonymized audio → Trial construction: supports combined trials