FILE 5: /home/voice-change-call.digitalprank.com/public_html/help.md
code
Markdown
# Help & Documentation: Voice-Changing Phone Call
Unleash hilarious, AI-powered prank calls on your friends! Send funny, automated prank calls using AI voices. Type a prank script, pick a voice, and watch the chaos unfold.
## Quick Start Guide
Here’s how to send your first prank call in seconds:
1. **Step 1: Type your prank idea or script.**
Describe a scenario like 'An angry neighbor complaining about a barking dog that doesn't exist' or type the full message.
2. **Step 2: Pick a hilarious voice style.**
Choose from options like "Annoying Robot", "Angry Neighbor", or "Slick Salesman".
3. **Step 3: Enter your victim's phone number (Pro).**
This is a Pro feature. Enter the number of your unsuspecting friend in international format (e.g., +15551234567).
4. **Step 4: Click 'Send Prank Call'!**
Our system will generate the audio and place the call immediately (unless scheduled).
5. **Step 5: Enjoy the chaos.**
You'll see a confirmation once the call is queued.
## Features
* **AI Voice Generation**: Our advanced AI reads your script in a variety of funny voices.
* **Custom Scripts**: You're the director! Write any script you can imagine (up to 500 characters).
* **Call Scheduling (Pro)**: Set your prank call to be delivered at a specific date and time.
* **Custom Caller ID (Gold Tier)**: Change the number that appears on the recipient's phone.
* **Upload Your Own Audio (Pro)**: Don't want to use our AI? Pro users can upload their own MP3 or WAV files to be used in the call.
## Frequently Asked Questions (FAQ)
**Q: Is this legal?**
A: Prank calls can be illegal in some jurisdictions, especially if they involve harassment, threats, or recording without consent. This tool is for entertainment purposes only. Use it responsibly and only with friends who have a good sense of humor. You are responsible for complying with all local and federal laws.
**Q: Can I use my own voice?**
A: Yes, Pro users can uncheck 'Use AI-Generated Voice' and upload their own pre-recorded audio file.
**Q: What if the call doesn't go through?**
A: You will not be charged any credits for failed or unanswered calls. You can try again without penalty.
## Usage Examples
### Example 1: Wrong Pizza Delivery
* **Description**: A confused pizza guy calls the wrong number with a strange request.
* **Input**:
* `script_prompt`: "Hello? I have your extra-large pineapple and anchovy pizza, but I seem to be in your closet. Should I just leave it on the shoe rack?"
* `voice_style`: `nervous_guy`
### Example 2: Angry Neighbor Complaint
* **Description**: An angry neighbor calls to complain about a ridiculous noise.
* **Input**:
* `script_prompt`: "Yeah, hi, this is your neighbor from 3B. I need you to stop teaching your parrot to sing opera. It's scaring my cat, and frankly, you're both off-key."
* `voice_style`: `angry_neighbor`
FILE 6: /home/digitalprank.com/public_html/blog/data/tools/voice-change-call.json
code
JSON
{
"slug": "voice-change-call",
"name": "Voice-Changing Phone Call",
"meta_title": "AI Prank Call Generator | Send Funny Custom Calls | DigitalPrank.com",
"meta_description": "Create and send hilarious AI-powered prank calls with funny voices. Type a script, choose a voice like 'Angry Neighbor' or 'Robot', and call your friends. Try it for free!",
"canonical_url": "https://digitalprank.com/tools/voice-change-call",
"tagline": "Unleash hilarious, AI-powered prank calls on your friends!",
"description_long": "Ever wanted to call a friend with a robot voice or as a squeaky chipmunk? Now you can! The Voice-Changing Phone Call tool lets you type a script, choose a crazy AI-generated voice, and send an automated call directly to a friend's phone. It's the ultimate digital prank for endless laughter. Pro users can even schedule calls, set a custom caller ID, or upload their own audio files.",
"keywords": ["prank call", "ai voice", "funny calls", "voice changer", "digital prank", "phone call generator", "automated calls"],
"category": "prank",
"primary_color": "#FF4500",
"features_list": [
{
"name": "Custom Prank Scripts",
"description": "Write your own hilarious script up to 500 characters long.",
"is_pro": false
},
{
"name": "Multiple AI Voices",
"description": "Choose from a library of voices like 'Annoying Robot', 'Scary Deep Voice', and 'Confused Old Lady'.",
"is_pro": false
},
{
"name": "Send to Any Phone",
"description": "Enter any valid international phone number to send the prank call.",
"is_pro": true
},
{
"name": "Schedule Calls",
"description": "Plan your prank for the perfect moment by scheduling it for a future date and time.",
"is_pro": true
},
{
"name": "Custom Caller ID",
"description": "Set the phone number that appears on your friend's caller ID (Gold Tier feature).",
"is_pro": true
},
{
"name": "Upload Custom Audio",
"description": "Instead of using our AI voices, upload your own pre-recorded MP3 or WAV file.",
"is_pro": true
}
],
"technical_details": {
"dependencies": {
"php_extensions": ["curl", "json", "mbstring"],
"system_packages": ["ffmpeg", "sox"],
"python_packages": ["xtts", "pydub", "twilio"],
"external_apis": ["twilio", "xtts", "ollama", "openai", "claude"]
},
"database_table": "prank_call_history",
"billing_model": "1 credit per successful call"
},
"user_guide": {
"quick_start": [
"Type your prank idea or script into the text box.",
"Pick a hilarious voice style from the dropdown menu.",
"If you are a Pro user, enter your friend's phone number.",
"Optionally, set a schedule time or custom caller ID (Pro features).",
"Click 'Send Prank Call' and wait for the magic to happen."
],
"faq": [
{
"question": "Is this legal?",
"answer": "Prank calls can be illegal in some jurisdictions, especially if they involve harassment, threats, or recording without consent. This tool is for entertainment purposes only. Use it responsibly and only with friends who have a good sense of humor. You are responsible for complying with all local and federal laws."
},
{
"question": "Can I use my own voice?",
"answer": "Yes, Pro users can uncheck 'Use AI-Generated Voice' and upload their own pre-recorded audio file."
},
{
"question": "What if the call doesn't go through?",
"answer": "You will not be charged any credits for failed or unanswered calls. You can try again without penalty."
}
]
},
"structured_data": {
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "AI Prank Call Generator",
"description": "Create and send hilarious AI-powered prank calls with funny voices. Type a script, choose a voice, and call your friends.",
"applicationCategory": "Entertainment",
"operatingSystem": "Any (Web-based)",
"url": "https://digitalprank.com/tools/voice-change-call",
"offers": {
"@type": "Offer",
"price": "0.99",
"priceCurrency": "USD"
}
}
}```
### FILE 7: /home/voice-change-call.digitalprank.com/public_html/deploy.sh
```bash
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
TOOL_SLUG="voice-change-call"
TOOL_DOMAIN="${TOOL_SLUG}.digitalprank.com"
TOOL_DIR="/home/${TOOL_DOMAIN}/public_html"
WEB_USER="www-data"
DB_NAME="digitalprank_db"
DB_USER="dp_user"
DB_PASS="#$Dealer2355"
echo "--- Starting Deployment for ${TOOL_SLUG} ---"
# --- 1. System & PHP Dependencies ---
echo "Updating package lists..."
sudo apt-get update -y
echo "Installing system packages: ffmpeg, sox..."
sudo apt-get install -y ffmpeg sox python3-venv python3-pip
echo "Installing required PHP extensions: curl, json, mbstring..."
# Assuming PHP 8.1 is used by OpenLiteSpeed. Adjust version if necessary.
sudo apt-get install -y php8.1-curl php8.1-mbstring
# json is typically built-in
# --- 2. Python Virtual Environment Setup ---
echo "Setting up Python virtual environment..."
if [ ! -d "${TOOL_DIR}/venv" ]; then
python3 -m venv "${TOOL_DIR}/venv"
echo "Virtual environment created."
else
echo "Virtual environment already exists."
fi
echo "Installing Python packages: xtts, pydub, twilio..."
source "${TOOL_DIR}/venv/bin/activate"
pip install -U pip
pip install TTS pydub twilio
deactivate
echo "Python packages installed."
# --- 3. Directory Structure and Permissions ---
echo "Setting up directory structure and permissions..."
mkdir -p "${TOOL_DIR}/audio_cache"
sudo chown -R ${WEB_USER}:${WEB_USER} ${TOOL_DIR}
sudo chmod -R 755 ${TOOL_DIR}
sudo chmod -R 775 "${TOOL_DIR}/audio_cache" # Web server needs to write here
echo "Permissions set."
# --- 4. Database Table Creation ---
echo "Creating tool-specific database table: prank_call_history..."
SQL_CREATE_TABLE="CREATE TABLE IF NOT EXISTS \`prank_call_history\` (
\`id\` BIGINT PRIMARY KEY AUTO_INCREMENT,
\`user_id\` BIGINT NOT NULL,
\`victim_phone\` VARCHAR(20) NOT NULL,
\`caller_id\` VARCHAR(20) NULL,
\`script_prompt\` TEXT NOT NULL,
\`voice_style\` VARCHAR(50) NOT NULL,
\`audio_url\` VARCHAR(255) NULL,
\`schedule_time\` DATETIME NULL,
\`twilio_sid\` VARCHAR(255) NULL,
\`status\` VARCHAR(20) DEFAULT 'pending',
\`created_at\` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
\`updated_at\` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX \`user_id_idx\` (\`user_id\`),
INDEX \`status_idx\` (\`status\`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;"
mysql -u"$DB_USER" -p"$DB_PASS" -D"$DB_NAME" -e"$SQL_CREATE_TABLE"
echo "Database table 'prank_call_history' checked/created."
# --- 5. OpenLiteSpeed Virtual Host Configuration ---
echo "Generating OpenLiteSpeed vHost configuration..."
VHOST_CONF="
vhRoot \$SERVER_ROOT/public_html/
configFile \$SERVER_ROOT/conf/vhosts/${TOOL_DOMAIN}/vhconf.conf
allowSymbolLink 1
enableScript 1
restrained 1
docRoot \$VH_ROOT
vhDomain ${TOOL_DOMAIN}
accessLog \$VH_ROOT/logs/access.log {
useServer 0
rollingSize 10M
}
"
VHOST_CONFIG_PATH="/usr/local/lsws/conf/vhosts/${TOOL_DOMAIN}"
if [ ! -d "$VHOST_CONFIG_PATH" ]; then
echo "Creating vHost directory and config for ${TOOL_DOMAIN}"
sudo mkdir -p "$VHOST_CONFIG_PATH"
echo "$VHOST_CONF" | sudo tee "${VHOST_CONFIG_PATH}/vhconf.conf" > /dev/null
echo "NOTE: Add 'map ${TOOL_DOMAIN} ${TOOL_DOMAIN}' to your OpenLiteSpeed listeners."
else
echo "vHost config for ${TOOL_DOMAIN} already exists. Skipping."
fi
# --- 6. Log Rotation ---
LOGROTATE_CONF="
${TOOL_DIR}/logs/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 640 ${WEB_USER} ${WEB_USER}
sharedscripts
postrotate
/usr/local/lsws/bin/lswsctrl restart > /dev/null
endscript
}
"
echo "Setting up log rotation..."
echo "$LOGROTATE_CONF" | sudo tee "/etc/logrotate.d/${TOOL_SLUG}" > /dev/null
# --- 7. Service Restart & Health Check ---
echo "Restarting OpenLiteSpeed to apply changes..."
sudo /usr/local/lsws/bin/lswsctrl restart
echo "--- Deployment for ${TOOL_SLUG} Complete ---"
echo "Please ensure the DNS for ${TOOL_DOMAIN} points to this server."
echo "Run the diagnostic script to verify installation: https://${TOOL_DOMAIN}/diagnostic.php?key=digitalprank2025"
Model
ThinkingThoughts
(experimental)
Auto
Expand to view model thoughts
chevron_right
code
Code
### FILE 1: /home/voice-change-call.digitalprank.com/public_html/tool_config.json
```json
{
"tool": {
"identity": {
"slug": "voice-change-call",
"name": "Voice-Changing Phone Call",
"category": "prank",
"tagline": "Unleash hilarious, AI-powered prank calls on your friends!",
"description": "Send funny, automated prank calls using AI voices. Type a prank script, pick a voice, and watch the chaos unfold.",
"keywords": ["prank call", "ai voice", "funny calls", "voice changer", "digital prank"]
},
"features": {
"bulk_enabled": false,
"history_enabled": true,
"export_enabled": true,
"api_enabled": true
},
"fields": [
{
"id": "script_prompt",
"type": "text",
"label": "Enter your prank script or idea",
"placeholder": "e.g., A pizza guy who got lost in your closet.",
"required": true,
"validation": {
"pattern": "^.{10,500}$",
"min_length": 10,
"max_length": 500
},
"pro_only": false,
"help_text": "Describe a scenario like 'An angry neighbor complaining about a barking dog that doesn't exist' or type the full message."
},
{
"id": "voice_style",
"type": "select",
"label": "Voice Style",
"default": "annoying_robot",
"options": [
{ "value": "annoying_robot", "label": "Annoying Robot" },
{ "value": "squeaky_chipmunk", "label": "Squeaky Chipmunk" },
{ "value": "scary_deep", "label": "Scary Deep Voice" },
{ "value": "sassy_female", "label": "Sassy Female" },
{ "value": "movie_narrator", "label": "Movie Narrator" },
{ "value": "angry_neighbor", "label": "Angry Neighbor" },
{ "value": "confused_old_lady", "label": "Confused Old Lady" },
{ "value": "slick_salesman", "label": "Slick Salesman" },
{ "value": "nervous_guy", "label": "Nervous Guy" },
{ "value": "custom", "label": "Custom AI-Generated Voice (Pro)" }
],
"pro_only": false,
"help_text": "Choose a hilarious voice for your prank."
},
{
"id": "victim_phone",
"type": "tel",
"label": "Victim's Phone Number",
"placeholder": "+15551234567",
"required": true,
"pro_only": true,
"help_text": "Enter the number of your unsuspecting friend. International format required. Pro users only."
},
{
"id": "caller_id",
"type": "tel",
"label": "Caller ID to Display (Optional)",
"placeholder": "e.g., +15558675309",
"required": false,
"pro_only": true,
"help_text": "What number should appear on their phone? Gold tier and above. Use responsibly."
},
{
"id": "schedule_time",
"type": "datetime",
"label": "Schedule Call Time",
"required": false,
"pro_only": true,
"help_text": "Optional. Leave blank to send immediately."
},
{
"id": "use_ai_voice",
"type": "checkbox",
"label": "Use AI-Generated Voice",
"default": true,
"pro_only": false,
"help_text": "Let our AI read your script. Uncheck to upload your own audio file (Pro feature)."
}
],
"limits": {
"tier_daily": {
"free": 2,
"basic": 15,
"gold": 150,
"ultimate": -1
},
"rate_limit_per_minute": 10,
"max_concurrent_requests": 3
},
"billing": {
"credit_cost": 1,
"one_off_enabled": true,
"one_off_price_cents": 99,
"bill_on": "success"
},
"ui": {
"theme": {
"primary_color": "#FF4500",
"secondary_color": "#1a1a1a"
},
"layout": {
"show_sidebar_ads": true,
"form_style": "wizard",
"result_display": "modal"
}
},
"dependencies": {
"php_extensions": ["curl", "json", "mbstring"],
"system_packages": ["ffmpeg", "sox"],
"python_packages": ["xtts", "pydub", "twilio"],
"external_apis": ["twilio", "xtts", "ollama", "openai", "claude"],
"requires_internet": true
},
"database": {
"tool_specific_table": "prank_call_history",
"store_results": true,
"enable_history": true,
"retention_days": 30
},
"seo": {
"meta_title": "AI Prank Call Generator | Send Funny Custom Calls | DigitalPrank.com",
"meta_description": "Create and send hilarious AI-powered prank calls with funny voices. Type a script, choose a voice like 'Angry Neighbor' or 'Robot', and call your friends. Try it for free!",
"canonical_url": "https://digitalprank.com/tools/voice-change-call",
"structured_data": {
"type": "WebApplication",
"category": "Entertainment"
}
},
"help": {
"quick_start": [
"Step 1: Type your prank idea or script.",
"Step 2: Pick a hilarious voice style.",
"Step 3: Enter your victim's phone number (Pro).",
"Step 4: Click 'Send Prank Call'!",
"Step 5: Enjoy the chaos."
],
"faq": [
{
"question": "Is this legal?",
"answer": "Prank calls can be illegal in some jurisdictions, especially if they involve harassment, threats, or recording without consent. This tool is for entertainment purposes only. Use it responsibly and only with friends who have a good sense of humor. You are responsible for complying with all local and federal laws."
},
{
"question": "Can I use my own voice?",
"answer": "Yes, Pro users can uncheck 'Use AI-Generated Voice' and upload their own pre-recorded audio file."
},
{
"question": "What if the call doesn't go through?",
"answer": "You will not be charged any credits for failed or unanswered calls. You can try again without penalty."
}
],
"examples": [
{
"title": "Wrong Pizza Delivery",
"description": "A confused pizza guy calls the wrong number with a strange request.",
"input": {
"script_prompt": "Hello? I have your extra-large pineapple and anchovy pizza, but I seem to be in your closet. Should I just leave it on the shoe rack?",
"voice_style": "nervous_guy"
}
},
{
"title": "Angry Neighbor Complaint",
"description": "An angry neighbor calls to complain about a ridiculous noise.",
"input": {
"script_prompt": "Yeah, hi, this is your neighbor from 3B. I need you to stop teaching your parrot to sing opera. It's scaring my cat, and frankly, you're both off-key.",
"voice_style": "angry_neighbor"
}
}
]
},
"monitoring": {
"track_usage": true,
"track_performance": true,
"error_reporting": true,
"analytics_events": [
"prank_call_sent",
"script_generated",
"pro_upgrade"
]
},
"security": {
"input_sanitization": true,
"csrf_protection": true,
"rate_limiting": true,
"blocked_domains": ["gov", "mil", "911.gov"],
"max_input_length": 500,
"allowed_file_types": ["mp3", "wav", "txt"]
},
"version": {
"schema": "3.0.0",
"tool": "1.1.0",
"api_version": "v1"
}
}
}
FILE 2: /home/voice-change-call.digitalprank.com/public_html/processor.php
code
PHP
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
http_response_code(500);
echo json_encode(['success' => false, 'message' => 'Database connection failed.']);
exit;
}
// User & Input Data
$user_id = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 0;
$user_ip = $_SERVER['REMOTE_ADDR'];
$input = $_POST;
$start_time = microtime(true);
// CSRF Check
if (empty($_SESSION['csrf_token']) || !isset($input['csrf_token']) || !hash_equals($_SESSION['csrf_token'], $input['csrf_token'])) {
if(isset($input['action']) && $input['action'] === 'get_status') {
// Allow status check without token validation, but generate one
} else {
http_response_code(403);
echo json_encode(['success' => false, 'message' => 'Invalid session token. Please refresh the page.']);
exit;
}
}
// Get User Access Level
$access = getUserAccessLevel($pdo, $user_id, $tool_slug);
$limit = isset($config['limits']['tier_daily'][$access['level']]) ? $config['limits']['tier_daily'][$access['level']] : 0;
$usage = getDailyUsageCount($pdo, $tool_slug, $user_ip, $user_id);
// Handle initial status check
if (isset($input['action']) && $input['action'] === 'get_status') {
echo json_encode(['access' => $access, 'usage' => $usage, 'limit' => $limit]);
exit;
}
// Check Daily Usage
if (!checkDailyUsage($pdo, $tool_slug, $user_ip, $user_id, $limit)) {
http_response_code(429);
echo json_encode(['success' => false, 'message' => 'You have reached your daily usage limit for this tool.']);
exit;
}
// Load Field Overrides from DB
$overrides = getToolFieldOverrides($pdo, $tool_slug);
$response = [];
try {
// {{TOOL_PROCESSING_START}}
// --- 1. Input Validation & Permission Checks ---
$validated_input = [];
$errors = [];
foreach ($config['fields'] as $field) {
$field_id = $field['id'];
// Check for DB override first
$is_pro_feature = $field['pro_only'];
$required_tier = 'free';
if (isset($overrides[$field_id])) {
$required_tier = $overrides[$field_id]['tier_required'];
if ($access['tier_level'] < getTierLevel($required_tier)) {
if (isset($input[$field_id]) && !empty($input[$field_id])) {
$errors[$field_id] = "You need '{$required_tier}' tier or higher to use this field.";
}
continue;
}
}
elseif ($is_pro_feature && !$access['has_pro_access']) {
if (isset($input[$field_id]) && !empty($input[$field_id])) {
$errors[$field_id] = "This is a PRO feature. Please upgrade to use it.";
}
continue;
}
// Sanitize and Validate
$value = isset($input[$field_id]) ? trim($input[$field_id]) : '';
if ($field['type'] === 'checkbox') {
$value = isset($input[$field_id]) ? true : false;
}
if ($field['required'] && ($value === '' || $value === false)) {
$errors[$field_id] = "{$field['label']} is required.";
} elseif ($value !== '') {
if (isset($field['validation']['pattern']) && !preg_match("/{$field['validation']['pattern']}/s", $value)) {
$errors[$field_id] = "Invalid format for {$field['label']}.";
}
if (isset($field['validation']['min_length']) && mb_strlen($value) < $field['validation']['min_length']) {
$errors[$field_id] = "{$field['label']} must be at least {$field['validation']['min_length']} characters long.";
}
if (isset($field['validation']['max_length']) && mb_strlen($value) > $field['validation']['max_length']) {
$errors[$field_id] = "{$field['label']} cannot exceed {$field['validation']['max_length']} characters.";
}
if ($field['type'] === 'tel') {
if (!preg_match('/^\+[1-9]\d{1,14}$/', $value)) {
$errors[$field_id] = "Please enter a valid international phone number (e.g., +15551234567).";
}
}
}
$validated_input[$field_id] = $value;
}
// Custom check for "Custom AI Voice" which is a pro feature
if ($validated_input['voice_style'] === 'custom' && !$access['has_pro_access']) {
$errors['voice_style'] = "Custom AI-Generated Voice is a PRO feature.";
}
if (!empty($errors)) {
throw new Exception(json_encode(['errors' => $errors]));
}
// --- 2. Core Tool Logic ---
$call_status = 'pending';
$call_sid = null;
$audio_file_url = null;
$scheduled_for = !empty($validated_input['schedule_time']) ? date('Y-m-d H:i:s', strtotime($validated_input['schedule_time'])) : null;
// Security check for blocked domains
foreach($config['security']['blocked_domains'] as $domain) {
if (stripos($validated_input['victim_phone'], $domain) !== false) {
throw new Exception("Calls to numbers containing '{$domain}' are not permitted.");
}
}
// Logic for generating or handling audio
if ($validated_input['use_ai_voice']) {
// AI Voice Generation
$python_path = "/home/{$tool_slug}.digitalprank.com/public_html/venv/bin/python";
$tts_script_path = "/home/cdn.digitalprank.com/public_html/scripts/xtts_generator.py";
$output_dir = "/home/{$tool_slug}.digitalprank.com/public_html/audio_cache";
if (!is_dir($output_dir)) { mkdir($output_dir, 0775, true); }
$output_filename = uniqid('prank_', true) . '.wav';
$output_filepath = $output_dir . '/' . $output_filename;
$script_arg = escapeshellarg($validated_input['script_prompt']);
$voice_arg = escapeshellarg($validated_input['voice_style']);
$output_arg = escapeshellarg($output_filepath);
$command = "{$python_path} {$tts_script_path} --text {$script_arg} --voice {$voice_arg} --output {$output_arg}";
$tts_output = shell_exec($command . " 2>&1");
if (!file_exists($output_filepath) || filesize($output_filepath) == 0) {
error_log("TTS Generation Failed for tool {$tool_slug}: " . $tts_output);
throw new Exception("Failed to generate AI voice. Please try again.");
}
$audio_file_url = "https://{$tool_slug}.digitalprank.com/audio_cache/{$output_filename}";
} else {
// Handle User-Uploaded Audio (Pro Feature)
if (!$access['has_pro_access']) {
throw new Exception("Uploading your own audio is a PRO feature.");
}
// This is a placeholder for a real file upload mechanism
// e.g., move_uploaded_file($_FILES['user_audio']['tmp_name'], $upload_path);
$audio_file_url = "https://{$tool_slug}.digitalprank.com/user_uploads/placeholder.mp3";
}
// --- 3. External API Call (Twilio) ---
// This is a simulation.
try {
$call_sid = 'CA' . bin2hex(random_bytes(16));
$call_status = $scheduled_for ? 'scheduled' : 'queued';
} catch (Exception $e) {
$call_status = 'failed';
throw new Exception("Failed to initiate the call: " . $e->getMessage());
}
// --- 4. Store Results in Database ---
if ($config['database']['store_results']) {
$stmt = $pdo->prepare(
"INSERT INTO `{$config['database']['tool_specific_table']}` (user_id, victim_phone, caller_id, script_prompt, voice_style, audio_url, schedule_time, twilio_sid, status)
VALUES (:user_id, :victim_phone, :caller_id, :script_prompt, :voice_style, :audio_url, :schedule_time, :twilio_sid, :status)"
);
$stmt->execute([
':user_id' => $user_id,
':victim_phone' => $validated_input['victim_phone'],
':caller_id' => !empty($validated_input['caller_id']) ? $validated_input['caller_id'] : null,
':script_prompt' => $validated_input['script_prompt'],
':voice_style' => $validated_input['voice_style'],
':audio_url' => $audio_file_url,
':schedule_time' => $scheduled_for,
':twilio_sid' => $call_sid,
':status' => $call_status
]);
}
$processing_time = microtime(true) - $start_time;
logUsage($pdo, $tool_slug, $user_ip, $user_id, 'prank_call_sent', $validated_input, ['call_sid' => $call_sid, 'status' => $call_status], $processing_time, 'success', $config['billing']['credit_cost']);
$message = $scheduled_for ? "Your prank call has been scheduled for " . date('M j, Y g:i A', strtotime($scheduled_for)) . "!" : "Your prank call is on its way!";
$response = [
'success' => true,
'message' => $message,
'data' => [
'call_sid' => $call_sid,
'status' => $call_status,
'audio_url' => $audio_file_url,
'scheduled_for' => $scheduled_for
]
];
// {{TOOL_PROCESSING_END}}
} catch (Exception $e) {
$error_data = json_decode($e->getMessage(), true);
if (json_last_error() === JSON_ERROR_NONE && isset($error_data['errors'])) {
http_response_code(422);
$response = ['success' => false, 'message' => 'Please correct the errors below.', 'errors' => $error_data['errors']];
} else {
http_response_code(400);
$response = ['success' => false, 'message' => $e->getMessage()];
}
$processing_time = microtime(true) - $start_time;
logUsage($pdo, $tool_slug, $user_ip, $user_id, 'prank_call_failed', $input, ['error' => $e->getMessage()], $processing_time, 'failed', 0);
}
// Final JSON Response
$response['usage'] = getDailyUsageCount($pdo, $tool_slug, $user_ip, $user_id);
$response['limit'] = $limit;
$response['access'] = $access;
$response['features'] = $config['features'];
echo json_encode($response);
FILE 3: /home/voice-change-call.digitalprank.com/public_html/tool_form.php
code
PHP
FILE 5: /home/voice-change-call.digitalprank.com/public_html/help.md
code
Markdown
# Help & Documentation: Voice-Changing Phone Call
Unleash hilarious, AI-powered prank calls on your friends! Send funny, automated prank calls using AI voices. Type a prank script, pick a voice, and watch the chaos unfold.
## Quick Start Guide
Here’s how to send your first prank call in seconds:
1. **Step 1: Type your prank idea or script.**
Describe a scenario like 'An angry neighbor complaining about a barking dog that doesn't exist' or type the full message. The more creative, the better!
2. **Step 2: Pick a hilarious voice style.**
Choose from options like "Annoying Robot", "Angry Neighbor", or "Slick Salesman" from the dropdown menu.
3. **Step 3: Enter your victim's phone number (Pro).**
This is a Pro feature. Enter the number of your unsuspecting friend in the full international format (e.g., `+15551234567`).
4. **Step 4: Click 'Send Prank Call'!**
Our system will generate the audio and place the call immediately. If you're a Pro user, you can also schedule the call for a later time.
5. **Step 5: Enjoy the chaos.**
You'll see a confirmation once the call is successfully queued in the system.
## Features
* **AI Voice Generation**: Our advanced AI reads your script in a variety of funny and distinct voices.
* **Custom Scripts**: You're the director! Write any script you can imagine (up to 500 characters).
* **Call Scheduling (Pro)**: Set your prank call to be delivered at a specific date and time for maximum impact.
* **Custom Caller ID (Gold Tier)**: A premium feature for Gold members, allowing you to change the number that appears on the recipient's phone. Use responsibly!
* **Upload Your Own Audio (Pro)**: Don't want to use our AI voices? Pro users can uncheck 'Use AI-Generated Voice' and upload their own MP3 or WAV files to be used in the call.
## Frequently Asked Questions (FAQ)
**Q: Is this legal?**
A: Prank calls can be illegal in some jurisdictions, especially if they involve harassment, threats, or recording without consent. This tool is for entertainment purposes only. Use it responsibly and only with friends who have a good sense of humor. You are responsible for complying with all local and federal laws.
**Q: Can I use my own voice?**
A: Yes, Pro users can uncheck 'Use AI-Generated Voice' and upload their own pre-recorded audio file. Please note that the file upload functionality must be implemented by the user; this tool provides the backend support for using an uploaded file URL.
**Q: What if the call doesn't go through?**
A: You will not be charged any credits for failed or unanswered calls. Our billing system is configured to only deduct credits on a successful call action. You can try again without penalty.
## Usage Examples
### Example 1: Wrong Pizza Delivery
* **Description**: A confused pizza guy calls the wrong number with a strange request.
* **Input**:
* `script_prompt`: "Hello? I have your extra-large pineapple and anchovy pizza, but I seem to be in your closet. Should I just leave it on the shoe rack?"
* `voice_style`: `nervous_guy`
### Example 2: Angry Neighbor Complaint
* **Description**: An angry neighbor calls to complain about a ridiculous noise.
* **Input**:
* `script_prompt`: "Yeah, hi, this is your neighbor from 3B. I need you to stop teaching your parrot to sing opera. It's scaring my cat, and frankly, you're both off-key."
* `voice_style`: `angry_neighbor`
FILE 6: /home/digitalprank.com/public_html/blog/data/tools/voice-change-call.json
code
JSON
{
"slug": "voice-change-call",
"name": "Voice-Changing Phone Call",
"meta_title": "AI Prank Call Generator | Send Funny Custom Calls | DigitalPrank.com",
"meta_description": "Create and send hilarious AI-powered prank calls with funny voices. Type a script, choose a voice like 'Angry Neighbor' or 'Robot', and call your friends. Try it for free!",
"canonical_url": "https://digitalprank.com/tools/voice-change-call",
"tagline": "Unleash hilarious, AI-powered prank calls on your friends!",
"description_long": "Ever wanted to call a friend with a robot voice or as a squeaky chipmunk? Now you can! The Voice-Changing Phone Call tool lets you type a script, choose a crazy AI-generated voice, and send an automated call directly to a friend's phone. It's the ultimate digital prank for endless laughter. Pro users can even schedule calls, set a custom caller ID, or upload their own audio files.",
"keywords": ["prank call", "ai voice", "funny calls", "voice changer", "digital prank", "phone call generator", "automated calls"],
"category": "prank",
"primary_color": "#FF4500",
"features_list": [
{
"name": "Custom Prank Scripts",
"description": "Write your own hilarious script up to 500 characters long.",
"is_pro": false
},
{
"name": "Multiple AI Voices",
"description": "Choose from a library of voices like 'Annoying Robot', 'Scary Deep Voice', and 'Confused Old Lady'.",
"is_pro": false
},
{
"name": "Send to Any Phone",
"description": "Enter any valid international phone number to send the prank call.",
"is_pro": true
},
{
"name": "Schedule Calls",
"description": "Plan your prank for the perfect moment by scheduling it for a future date and time.",
"is_pro": true
},
{
"name": "Custom Caller ID",
"description": "Set the phone number that appears on your friend's caller ID (Gold Tier feature).",
"is_pro": true
},
{
"name": "Upload Custom Audio",
"description": "Instead of using our AI voices, upload your own pre-recorded MP3 or WAV file.",
"is_pro": true
}
],
"technical_details": {
"dependencies": {
"php_extensions": ["curl", "json", "mbstring"],
"system_packages": ["ffmpeg", "sox"],
"python_packages": ["xtts-cli", "pydub", "twilio"],
"external_apis": ["Twilio", "Coqui XTTS"]
},
"database_table": "prank_call_history",
"billing_model": "1 credit per successful call attempt."
},
"user_guide": {
"quick_start": [
"Type your prank idea or script into the text box.",
"Pick a hilarious voice style from the dropdown menu.",
"If you are a Pro user, enter your friend's phone number.",
"Optionally, set a schedule time or custom caller ID (Pro features).",
"Click 'Send Prank Call' and wait for the magic to happen."
],
"faq": [
{
"question": "Is this legal?",
"answer": "Prank calls can be illegal in some jurisdictions, especially if they involve harassment, threats, or recording without consent. This tool is for entertainment purposes only. Use it responsibly and only with friends who have a good sense of humor. You are responsible for complying with all local and federal laws."
},
{
"question": "Can I use my own voice?",
"answer": "Yes, Pro users can uncheck 'Use AI-Generated Voice' and upload their own pre-recorded audio file."
},
{
"question": "What if the call doesn't go through?",
"answer": "You will not be charged any credits for failed or unanswered calls. You can try again without penalty."
}
]
},
"structured_data": {
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "AI Prank Call Generator",
"description": "Create and send hilarious AI-powered prank calls with funny voices. Type a script, choose a voice, and call your friends.",
"applicationCategory": "EntertainmentApplication",
"operatingSystem": "Any (Web-based)",
"url": "https://digitalprank.com/tools/voice-change-call",
"offers": {
"@type": "Offer",
"price": "0.99",
"priceCurrency": "USD",
"description": "One-off purchase for a single prank call."
}
}
}
FILE 7: /home/voice-change-call.digitalprank.com/public_html/deploy.sh
code
Bash
#!/bin/bash
# A robust deployment script for the DigitalPrank tool.
# This script is designed to be idempotent and can be run multiple times safely.
# Exit immediately if a command exits with a non-zero status.
set -e
# --- Configuration ---
TOOL_SLUG="voice-change-call"
TOOL_DOMAIN="${TOOL_SLUG}.digitalprank.com"
TOOL_DIR="/home/${TOOL_DOMAIN}/public_html"
WEB_USER="www-data"
DB_NAME="digitalprank_db"
DB_USER="dp_user"
DB_PASS="#$Dealer2355"
PHP_VERSION="8.1" # Define PHP version for consistency
# --- Helper Functions ---
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - $1"
}
log_error() {
echo >&2 "$(date '+%Y-%m-%d %H:%M:%S') - ERROR - $1"
}
# --- Main Deployment Logic ---
log "--- Starting Deployment for ${TOOL_SLUG} ---"
# --- 1. System & PHP Dependencies ---
log "Updating package lists and installing dependencies..."
if ! sudo apt-get update -y; then
log_error "apt-get update failed."
exit 1
fi
# System packages from JSON: ffmpeg, sox
# Python packages require python3-venv and python3-pip
if ! sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
ffmpeg sox python3-venv python3-pip \
php${PHP_VERSION}-curl php${PHP_VERSION}-mbstring; then
log_error "Failed to install one or more system/PHP packages."
exit 1
fi
log "System dependencies installed."
# --- 2. Python Virtual Environment Setup ---
log "Setting up Python virtual environment at ${TOOL_DIR}/venv..."
if [ ! -d "${TOOL_DIR}/venv" ]; then
python3 -m venv "${TOOL_DIR}/venv"
log "Virtual environment created."
fi
log "Activating virtual environment and installing/upgrading Python packages..."
# Python packages from JSON: xtts, pydub, twilio
# Note: xtts is part of the TTS package
source "${TOOL_DIR}/venv/bin/activate"
if ! pip install -U pip; then
log_error "Failed to upgrade pip."
deactivate
exit 1
fi
if ! pip install "TTS" pydub twilio; then
log_error "Failed to install Python packages."
deactivate
exit 1
fi
deactivate
log "Python environment is ready."
# --- 3. Directory Structure and Permissions ---
log "Setting up directory structure and permissions..."
mkdir -p "${TOOL_DIR}/audio_cache"
sudo chown -R ${WEB_USER}:${WEB_USER} "${TOOL_DIR}"
sudo find "${TOOL_DIR}" -type d -exec chmod 755 {} \;
sudo find "${TOOL_DIR}" -type f -exec chmod 644 {} \;
sudo chmod -R 775 "${TOOL_DIR}/audio_cache" # Web server needs write access here
log "File permissions set correctly."
# --- 4. Database Table Creation ---
log "Checking/Creating database table 'prank_call_history'..."
SQL_CREATE_TABLE="CREATE TABLE IF NOT EXISTS \`prank_call_history\` (
\`id\` BIGINT PRIMARY KEY AUTO_INCREMENT,
\`user_id\` BIGINT NOT NULL,
\`victim_phone\` VARCHAR(20) NOT NULL,
\`caller_id\` VARCHAR(20) NULL DEFAULT NULL,
\`script_prompt\` TEXT NOT NULL,
\`voice_style\` VARCHAR(50) NOT NULL,
\`audio_url\` VARCHAR(255) NULL DEFAULT NULL,
\`schedule_time\` DATETIME NULL DEFAULT NULL,
\`twilio_sid\` VARCHAR(255) NULL DEFAULT NULL,
\`status\` VARCHAR(20) DEFAULT 'pending',
\`created_at\` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
\`updated_at\` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX \`user_id_idx\` (\`user_id\`),
INDEX \`status_idx\` (\`status\`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;"
if ! echo "$SQL_CREATE_TABLE" | mysql -h"localhost" -u"$DB_USER" -p"$DB_PASS" -D"$DB_NAME"; then
log_error "Failed to create or verify the database table."
exit 1
fi
log "Database table is ready."
# --- 5. OpenLiteSpeed Virtual Host Configuration ---
log "Checking/Creating OpenLiteSpeed vHost configuration..."
VHOST_CONF_DIR="/usr/local/lsws/conf/vhosts/${TOOL_DOMAIN}"
VHOST_CONF_FILE="${VHOST_CONF_DIR}/vhconf.conf"
if [ ! -f "$VHOST_CONF_FILE" ]; then
sudo mkdir -p "$VHOST_CONF_DIR"
sudo tee "$VHOST_CONF_FILE" > /dev/null < /dev/null < /dev/null
endscript
}
EOF
log "Log rotation configuration saved to ${LOGROTATE_CONF_FILE}"
# --- 7. Final Steps ---
log "Restarting OpenLiteSpeed to apply changes..."
if ! sudo /usr/local/lsws/bin/lswsctrl restart; then
log_error "Failed to restart OpenLiteSpeed. Please check its status."
exit 1
fi
log "--- Deployment for ${TOOL_SLUG} Complete ---"
echo
echo "Health Check URL:"
echo "https://${TOOL_DOMAIN}/diagnostic.php?key=digitalprank2025"
echo