TGViewer
💎 کریستال تیم | آموزش برنامه نویسی 💎 💎 کریستال تیم | آموزش برنامه نویسی 💎 @cristalteam · 564 subscribers
Post #2271 1.29K
ساخت ویس با هوش مصنوعی ( زبان فارسی )

<?php

header('Content-Type: application/json; charset=utf-8');

$text = $_GET['text'] ?? '';
$character = $_GET['character'] ?? 'woman';

$voices = [
'man' => 'wCpDE4gsR6807a59702179cfa9e078954784f43e70FKks86Ob_neural',
'woman' => 'shWiVtImn6807a59702179cfa9e078954784f43e7sY6wpUqA3_neural',
];

if (empty($text)) {
echo json_encode([
'status' => 'error',
'message' => 'Parameter "text" is required.'
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
exit;
}

if (!isset($voices[$character])) {
echo json_encode([
'status' => 'error',
'message' => 'Invalid character. Use "man" or "woman".'
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
exit;
}

$data = [
'csrf_test_name' => '39be94db037027744fb8cafd0d9fe321',
'front_tryme_language' => 'fa-IR',
'front_tryme_voice' => $voices[$character],
'front_tryme_text' => $text,
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://texttospeech.online/home/tryme_action/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/x-www-form-urlencoded',
'Cookie: csrf_cookie_name=39be94db037027744fb8cafd0d9fe321',
]);

$response = curl_exec($ch);

if (curl_errno($ch)) {
echo json_encode([
'status' => 'error',
'message' => 'Connection error: ' . curl_error($ch)
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
exit;
}

curl_close($ch);

$result = json_decode($response, true);

if (json_last_error() === JSON_ERROR_NONE) {
echo json_encode([
'status' => 'success',
'raw_response' => $result
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
} else {
echo json_encode([
'status' => 'error',
'message' => 'Invalid JSON response.',
'raw_response' => $response
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
}



با منبع بفرست چنلت ❤️
@PaMicK
@CristalTeam
  • 👍 4
  • 🔥 2
  • ❤ 1
More from @cristalteam
  1. Feb 25, 2026سورس وبسرویس اینستا دانلودر 👑 💻زبان توسعه دهنده : PHP ⚙️سطح : متوسط 💎سازنده : ʜᴀᴊɪ 💬تو…
  2. Jan 20, 2026💎 کریستال تیم | آموزش برنامه نویسی 💎 pinned Deleted message
  3. Nov 23, 2025Post #2273
  4. Oct 31, 2025ری اکشن هارو بترکونید بریم چت با هوش‌مصنوعی چندین مدله بزاریم ✅
  5. Oct 31, 2025💎 سورس وبسرویس ساخت عکس با هوش‌مصنوعی 💎 ✅ نوشته شده با زبان محبوب php ✅نوشته شده بصورت ش…
  6. Sep 20, 2025یکم ری اکشن هارو ببرین بالا یک وبسرویس چت بات با کلی مدل رایگان براتون بزارم ✅
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →