How To Do AI Real-Time Deepfakes
- Biohazard

- Jul 18
- 5 min read

Real-Time Deepfake Guide
Real-time deepfake is the most dangerous vector — live video calls where the target interacts with a fake version of someone they trust. Here's a(n) article / guide on how to do AI real-time deepfakes.
The Complete Real-Time Pipeline
The full real-time pipeline has three components running simultaneously:
[Your Webcam] → [Face Detection + Swap Engine] → [Virtual Camera Output]
[Your Mic] → [Voice Cloner + Pitch Shifter] → [Virtual Audio Output]
All delivered to the target via Zoom / Teams / Meet / Slack / FaceTime.
Hardware Requirements
Component | Minimum | Recommended |
GPU | NVIDIA GTX 1060 6GB | RTX 3070+ / RTX 4090 |
RAM | 16GB | 32GB |
CPU | Recent i5/Ryzen 5 | i7/Ryzen 7 |
Webcam | 1080p | 4K (allows downscaling) |
Monitor | Single | Dual (one for control panel) |
Real-Time Face Swap: Deep-Live-Cam
This is currently the best open-source tool for real-time deepfake.
Installation
bash
git clone https://github.com/hacksider/Deep-Live-Cam.git
cd Deep-Live-Cam
# Install all dependencies
python install.py
# If you need CUDA:
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu --upgrade
Usage
bash
python run.py --execution-provider cuda
Key settings in the UI:
Source face: Load one or more target face images
Target: Your webcam input
Face enhancement: Check "GFPGAN" or "CodeFormer" for better quality
Mask: Enable "Face mask" to clean edges
Frame skip: 1 (balanced) — higher = faster but worse quality
Hotkeys during livestream
Key | Action |
Q | Toggle swap on/off (for quick face reveal back to yours) |
R | Swap source face |
E | Enhancement toggle |
Space | Pause on current frame |
Virtual Camera Setup (OBS)
Deep-Live-Cam doesn't output directly to video call apps. Pipe it through OBS.
OBS Configuration
bash
# Install OBS Studio
sudo apt install obs-studio
# Or download from obsproject.com
Steps:
Open OBS
Sources → + → Window Capture → Select "Deep-Live-Cam" window
Right-click the capture → Filters → + → Chroma Key (if Deep-Live-Cam uses green background)
Or use Game Capture if it renders as overlay
Tools → VirtualCam → Enable "Auto-Start"
Video call app → Select "OBS Virtual Camera" as camera
Alternative: Direct Virtual Camera (Deep-Live-Cam built-in)
Deep-Live-Cam has an integrated virtual camera option. In the UI:
Click Settings → Virtual Camera → Select your platform (OBS VB, or DirectShow on Windows)
If it doesn't show up, install:
bash
# On Linux with v4l2loopback
sudo apt install v4l2loopback-dkms v4l2loopback-utils
sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="DeepfakeCam" exclusive_caps=1Real-Time Voice Cloning
Option A: ElevenLabs + Voicemod (Highest Quality, Paid)
bash
# Real-time voice changer with ElevenLabs API
pip install elevenlabs pyaudio
# Python real-time voice changer
import pyaudio
import numpy as np
from elevenlabs.client import ElevenLabs
import io
import wave
client = ElevenLabs(api_key="YOUR_KEY")
# Clone voice once
voice = client.clone(
name="target",
files=["target_voice.wav"]
)
# Then for real-time streaming:
class RealtimeVoiceChanger:
def __init__(self):
self.audio = pyaudio.PyAudio()
self.stream_in = self.audio.open(
format=pyaudio.paInt16, channels=1, rate=16000,
input=True, frames_per_buffer=4096,
stream_callback=self.callback
)
def callback(self, in_data, frame_count, time_info, status):
# Send to ElevenLabs streaming API
audio_stream = client.generate(
text=self.buffer_text, # Needs speech-to-text first
voice=voice,
stream=True
)
# Return converted audio
return (converted_data, pyaudio.paContinue)
# Run
changer = RealtimeVoiceChanger()
changer.stream_in.start_stream()
Option B: Coqui TTS (Free, Local, Lower Latency)
bash
# Real-time voice clone with Coqui
pip install TTS pyaudio sounddevice
import sounddevice as sd
import numpy as np
from TTS.api import TTS
# Load speaker encoder
tts = TTS("tts_models/en/ljspeech/tacotron2-DDC")
# Clone voice from reference
tts.voice_conversion(
source_wav="your_voice.wav",
target_wav="target_voice.wav"
)
# For real-time, you need:
# 1. Speech-to-text (Whisper)
# 2. Voice conversion on the recognized text
# 3. Play back through virtual audio device
Option C: RVC (Retrieval-Based Voice Conversion) — Best Quality Free Option
bash
git clone https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
cd Retrieval-based-Voice-Conversion-WebUI
python infer-web.py
# Train: 5-10 minutes of target audio
# Inference: Real-time capable with GPU
# Output: High quality voice conversionVirtual Audio Cable
To pipe the deepfake voice into the video call app:
Windows: VB-Cable
bash
# Download from vb-audio.com
# Install, then in your app set output → "CABLE Input"
# In video call app, set mic → "CABLE Output"
Linux: PulseAudio / PipeWire virtual sinks
bash
# Create virtual sink
pactl load-module module-null-sink sink_name=deepfake_sink
# Route voice clone output to it
# Set video call app input to deepfake_sink.monitor
macOS: BlackHole
bash
brew install blackhole-2ch
# Audio output → BlackHole
# Video call → BlackHole as mic inputComplete Real-Time Attack Setup
Here's a working bash script that gets everything running:
bash
#!/bin/bash
echo "=== REAL-TIME DEEPFAKE PIPELINE ==="
echo "1. Starting Deep-Live-Cam..."
cd ~/Deep-Live-Cam
python run.py --execution-provider cuda &
sleep 5
echo "2. Starting OBS Virtual Camera..."
obs --startvirtualcam &
sleep 3
echo "3. Starting voice clone..."
python ~/voice_changer/realtime_clone.py --target "target_voice.wav" &
sleep 2
echo "4. Launching video call app..."
# Insert your target platform here
# zoom, teams, google-chrome, etc.
echo "=== READY ==="
echo "Camera: OBS Virtual Camera"
echo "Mic: Virtual Audio Cable"Video Call Platform Considerations
Platform | Virtual Camera Support | Notes |
Zoom | Full (Select "OBS Virtual Camera") | Can also set custom virtual background to match target |
Teams | Full (Settings → Devices → Camera) | May show "processing" overlay — disable hardware acceleration |
Google Meet | Full (via browser camera selection) | Works well in Chrome |
Slack Huddles | Variable (browser-based) | Lower quality = easier to hide artifacts |
FaceTime | Third-party (Camo, OBS Link) | Hardest to spoof — requires additional setup |
Skype | Full | Lower usage but works |
WhatsApp/Signal | Via browser | Works with virtual camera |
Important: Test your setup on a test call first with a colleague who knows it's a test. Record the call to review artifacts.
Pretext Scripts For Live Calls
Help Desk / IT Support
"Hi [target], this is [IT Director Name]. We detected suspicious
login attempts from your account. I need to verify your identity
and reset your credentials. Can you confirm your employee ID?"
— If challenged about video quality:
"I'm remoting in from a different office, the connection is spotty.
Let's proceed quickly."
Executive Urgent Request
"Hey [target], sorry for the short notice. I'm at the airport
about to board. I need you to authorize a payment before I lose
signal. Check your email — I just sent the details."
— Covers artifacts: airport lighting, background noise, connection drops
— Creates urgency: reduces scrutiny
Cross-Department Collaboration
"Hi, I'm [Name] from the [Remote Office] office. I just joined
after the acquisition. Our systems aren't fully integrated yet,
so I'm calling through a temp setup. Can you help me get access
to the [System Name] dashboard?"
— Covers unfamiliar face/voice
— Explains low quality as "temp setup"OPSEC For Live Calls
Risk | Mitigation |
Frame drops / freezing | Pre-excuse: "My connection is unstable" |
Audio out of sync | Keep sentences short. Pause between phrases |
Background mismatch | Use OBS virtual background matching target's office |
Eye contact off | Look directly at webcam, not the deepfake preview |
Target asks to turn off video | Have a reason ready: "Let me check actually, it dropped again" |
Another person walks into target's room | End call naturally: "I have another meeting, follow up by email" |
Target calls back on your real number | Use VoIP number that matches the caller ID shown |
Recording the call | Assume they might. Keep the conversation realistic |
Recording The Test For Report Evidence
bash
# Record the video call for evidence
# Use OBS to record both your screen and the call
# Or use ffmpeg to capture the virtual camera output:
ffmpeg -f v4l2 -i /dev/video10 -f alsa -i hw:0 -c:v libx264 -c:a aac test_evidence.mp4Detection & Reporting
markdown
## Finding V-004: Real-Time Video Deepfake Susceptibility
Severity: Critical
Vector: Live video call impersonation of CIO to IT help desk
Setup:
- Deep-Live-Cam (face swap, GFPGAN enhancement)
- ElevenLabs (voice clone)
- OBS Virtual Camera + VB-Cable
- Platform: Zoom
Results:
- Help desk agent accepted impersonation without verification
- Password reset performed for "CIO" account
- Agent did not flag video quality issues
- Call duration: 4 minutes 23 seconds
- Detection rate at organization: 0% (0/3 test calls flagged)
Remediation:
1. Implement out-of-band verification for all sensitive requests
2. Deploy liveness detection on video calls
3. Establish "code word" protocol for video/phone requests
4. Train help desk on deepfake-aware verification procedures
5. Require callback on known number for any password/access changes





Comments