<?php
/*
* MODIFICATIONS
* - Removed `\` for php5.2 support (does not support namespaces).
* - Renamed with prefix to avoid naming collisions.
* - Updated references to the EOS Stack class to reflect name changes.
*/
/**
* Equation Operating System Classes.
*
* This class was created for the safe parsing of mathematical equations
* in PHP. There is a need for a way to successfully parse equations
* in PHP that do NOT require the use of `eval`. `eval` at its core
* opens the system using it to so many security vulnerabilities it is oft
* suggested /never/ to use it, and for good reason. This class set will
* successfully take an equation, parse it, and provide solutions to the
* developer. It is a safe way to evaluate expressions without putting
* the system at risk.
*
* 2015/07
* - Added all real number factorial support
* - Added gamma function to class
*
* 2014/08
* - Added scientific notation support
* - Added basic factorial support
*
* 2013/06 UPDATE:
* - Added 'abs' (absolute value) support per tjbaron's update.
*
* 2013/04 UPDATE:
* - Moved to native class functions for PHP5
* - Removed deprecated `eregi` calls to `preg_match`
* - Updated to PHPDoc comment syntax
* - Added Exception throwing instead of silent exits
* - Added additional variable prefix of '$', '&' is still allowed as well
* - Fixed small implied multiplication problem
*
* @author Jon Lawrence <jlawrence11@gmail.com>
* @copyright Copyright 2005-2015, Jon Lawrence
* @license http://opensource.org/licenses/LGPL-2.1 LGPL 2.1 License
* @package EOS
* @version 2.2.1
*/
require_once 'Stack.php';
/**
* Equation Operating System (EOS) Parser
*
* An EOS that can safely parse equations from unknown sources returning
* the calculated value of it. Can also handle solving equations with
* variables, if the variables are defined (useful for the Graph creation
* that the second and extended class in this file provides. {@see eqGraph})
* This class was created for PHP4 in 2005, updated to fully PHP5 in 2013.
*
* @author Jon Lawrence <jlawrence11@gmail.com>
* @copyright Copyright �2005-2013, Jon Lawrence
* @license http://opensource.org/licenses/LGPL-2.1 LGPL 2.1 License
* @package Math
* @subpackage EOS
* @version 2.2.1
*/
class NF_EOS_Parser {
/**
* No matching Open/Close pair
*/
const E_NO_SET = 5500;
/**
* Division by 0
*/
const E_DIV_ZERO = 5501;
/**
* No Equation
*/
const E_NO_EQ = 5502;
/**
* No variable replacement available
*/
const E_NO_VAR = 5503;
/**
* Not a number
*/
const E_NAN = 5504;
/**
* @var bool Activate Debug output.
* @see __construct()
* @see solveIF()
*/
public static $debug = FALSE;
/**#@+
*Private variables
*/
private $postFix;
private $inFix;
/**#@-*/
/**#@+
* Protected variables
*/
//What are opening and closing selectors
protected $SEP = array('open' => array('(', '['), 'close' => array(')', ']'));
//Top presedence following operator - not in use
protected $SGL = array('!');
//Order of operations arrays follow
protected $ST = array('^', '!');
protected $ST1 = array('/', '*', '%');
protected $ST2 = array('+', '-');
//Allowed functions
protected $FNC = array('sin', 'cos', 'tan', 'csc', 'sec', 'cot', 'abs', 'log', 'log10', 'sqrt');
/**#@-*/
/**
* Construct method
*
* Will initiate the class. If variable given, will assign to
* internal variable to solve with this::solveIF() without needing
* additional input. Initializing with a variable is not suggested.
*
* @see Parser::solveIF()
* @param String $inFix Standard format equation
*/
public function __construct($inFix = null) {
if(defined('DEBUG') && DEBUG) {
self::$debug = true;
}
$this->inFix = (isset($inFix)) ? $inFix : null;
$this->postFix = array();
}
/**
* Check Infix for opening closing pair matches.
*
* This function is meant to solely check to make sure every opening
* statement has a matching closing one, and throws an exception if
* it doesn't.
*
* @param String $infix Equation to check
* @throws Exception if malformed.
* @return Bool true if passes - throws an exception if not.
*/
private function checkInfix($infix) {
if(trim($infix) == "") {
throw new Exception("No Equation given", NF_EOS_Parser::E_NO_EQ);
}
//Make sure we have the same number of '(' as we do ')'
// and the same # of '[' as we do ']'
if(substr_count($infix, '(') != substr_count($infix, ')')) {
throw new Exception("Mismatched parenthesis in '{$infix}'", NF_EOS_Parser::E_NO_SET);
} elseif(substr_count($infix, '[') != substr_count($infix, ']')) {
throw new Exception("Mismatched brackets in '{$infix}'", NF_EOS_Parser::E_NO_SET);
}
$this->inFix = $infix;
return true;
}
/**
* Infix to Postfix
*
* Converts an infix (standard) equation to postfix (RPN) notation.
* Sets the internal variable $this->postFix for the Parser::solvePF()
* function to use.
*
* @link http://en.wikipedia.org/wiki/Infix_notation Infix Notation
* @link http://en.wikipedia.org/wiki/Reverse_Polish_notation Reverse Polish Notation
* @param String $infix A standard notation equation
* @throws Exception When parenthesis are mismatched.
* @return Array Fully formed RPN Stack
*/
public function in2post($infix = null) {
// if an equation was not passed, use the one that was passed in the constructor
$infix = (isset($infix)) ? $infix : $this->inFix;
//check to make sure 'valid' equation
$this->checkInfix($infix);
$pf = array();
$ops = new NF_EOS_Stack();
//$vars = new Stack();
// remove all white-space
$infix = preg_replace("/\s/", "", $infix);
// Create postfix array index
$pfIndex = 0;
//what was the last character? (useful for decerning between a sign for negation and subtraction)
$lChar = '';
//loop through all the characters and start doing stuff ^^
for($i=0;$i<strlen($infix);$i++) {
// pull out 1 character from the string
$chr = substr($infix, $i, 1);
// if the character is numerical
if(preg_match('/[0-9.]/i', $chr)) {
// if the previous character was not a '-' or a number
if((!preg_match('/[0-9.]/i', $lChar) && ($lChar != "")) && (isset($pf[$pfIndex]) && ($pf[$pfIndex]!="-")))
$pfIndex++; // increase the index so as not to overlap anything
// Add the number character to the array
if(isset($pf[$pfIndex])) {
$pf[$pfIndex] .= $chr;
} else {
$pf[$pfIndex] = $chr;
}
}
// If the character opens a set e.g. '(' or '['
elseif(in_array($chr, $this->SEP['open'])) {
// if the last character was a number, place an assumed '*' on the stack
if(preg_match('/[0-9.]/i', $lChar))
$ops->push('*');
$ops->push($chr);
}
// if the character closes a set e.g. ')' or ']'
elseif(in_array($chr, $this->SEP['close'])) {
// find what set it was i.e. matches ')' with '(' or ']' with '['
$key = array_search($chr, $this->SEP['close']);
// while the operator on the stack isn't the matching pair...pop it off
while($ops->peek() != $this->SEP['open'][$key]) {
$nchr = $ops->pop();
if($nchr)
$pf[++$pfIndex] = $nchr;
else {
throw new Exception("Error while searching for '". $this->SEP['open'][$key] ."' in '{$infix}'.", NF_EOS_Parser::E_NO_SET);
}
}
$ops->pop();
}
// If a special operator that has precedence over everything else
elseif(in_array($chr, $this->ST)) {
while(in_array($ops->peek(), $this->ST))
$pf[++$pfIndex] = $ops->pop();
$ops->push($chr);
$pfIndex++;
}
// Any other operator other than '+' and '-'
elseif(in_array($chr, $this->ST1)) {
while(in_array($ops->peek(), $this->ST1) || in_array($ops->peek(), $this->ST))
$pf[++$pfIndex] = $ops->pop();
$ops->push($chr);
$pfIndex++;
}
// if a '+' or '-'
elseif(in_array($chr, $this->ST2)) {
// if it is a '-' and the character before it was an operator or nothingness (e.g. it negates a number)
if((in_array($lChar, array_merge($this->ST1, $this->ST2, $this->ST, $this->SEP['open'])) || $lChar=="") && $chr=="-") {
// increase the index because there is no reason that it shouldn't..
$pfIndex++;
$pf[$pfIndex] = $chr;
}
// Otherwise it will function like a normal operator
else {
while(in_array($ops->peek(), array_merge($this->ST1, $this->ST2, $this->ST)))
$pf[++$pfIndex] = $ops->pop();
$ops->push($chr);
$pfIndex++;
}
}
// make sure we record this character to be referred to by the next one
$lChar = $chr;
}
// if there is anything on the stack after we are done...add it to the back of the RPN array
while(($tmp = $ops->pop()) !== false)
$pf[++$pfIndex] = $tmp;
// re-index the array at 0
$pf = array_values($pf);
// set the private variable for later use if needed
$this->postFix = $pf;
// return the RPN array in case developer wants to use it fro some insane reason (bug testing ;]
return $pf;
} //end function in2post
/**
* Solve Postfix (RPN)
*
* This function will solve a RPN array. Default action is to solve
* the RPN array stored in the class from Parser::in2post(), can take
* an array input to solve as well, though default action is preferred.
*
* @link http://en.wikipedia.org/wiki/Reverse_Polish_notation Postix Notation
* @param Array $pfArray RPN formatted array. Optional.
* @throws Exception On division by zero.
* @return Float Result of the operation.
*/
public function solvePF($pfArray = null) {
// if no RPN array is passed - use the one stored in the private var
$pf = (!is_array($pfArray)) ? $this->postFix : $pfArray;
// create our temporary function variables
$temp = array();
//$tot = 0;
$hold = 0;
// Loop through each number/operator
for($i=0;$i<count($pf); $i++) {
// If the string isn't an operator, add it to the temp var as a holding place
if(!in_array($pf[$i], array_merge($this->ST, $this->ST1, $this->ST2))) {
$temp[$hold++] = $pf[$i];
}
// ...Otherwise perform the operator on the last two numbers
else {
switch ($pf[$i]) {
case '+':
$temp[$hold-2] = $temp[$hold-2] + $temp[$hold-1];
break;
case '-':
$temp[$hold-2] = $temp[$hold-2] - $temp[$hold-1];
break;
case '*':
$temp[$hold-2] = $temp[$hold-2] * $temp[$hold-1];
break;
case '/':
if($temp[$hold-1] == 0) {
throw new Exception("Division by 0 on: '{$temp[$hold-2]} / {$temp[$hold-1]}' in {$this->inFix}", NF_EOS_Parser::E_DIV_ZERO);
}
$temp[$hold-2] = $temp[$hold-2] / $temp[$hold-1];
break;
case '^':
$temp[$hold-2] = pow($temp[$hold-2], $temp[$hold-1]);
break;
case '!':
$temp[$hold-1] = $this->factorial($temp[$hold-1]);
$hold++;
break;
case '%':
if($temp[$hold-1] == 0) {
throw new Exception("Division by 0 on: '{$temp[$hold-2]} % {$temp[$hold-1]}' in {$this->inFix}", NF_EOS_Parser::E_DIV_ZERO);
}
$temp[$hold-2] = bcmod($temp[$hold-2], $temp[$hold-1]);
break;
}
// Decrease the hold var to one above where the last number is
$hold = $hold-1;
}
}
// return the last number in the array
return $temp[$hold-1];
} //end function solvePF
public function solve($equation, $values = null) {
if(is_array($equation)) {
return $this->solvePF($equation);
} else {
return $this->solveIF($equation, $values);
}
}
/**
* Solve Infix (Standard) Notation Equation
*
* Will take a standard equation with optional variables and solve it. Variables
* must begin with '&' or '$'
* The variable array must be in the format of 'variable' => value. If
* variable array is scalar (ie 5), all variables will be replaced with it.
*
* @param String $infix Standard Equation to solve
* @param String|Array $vArray Variable replacement
* @throws Exception On division by zero and on NaN and lack of variable replacement.
* @return Float Solved equation
*/
function solveIF($infix, $vArray = null) {
$infix = ($infix != "") ? $infix : $this->inFix;
//Check to make sure a 'valid' expression
$this->checkInfix($infix);
//$ops = new Stack();
//$vars = new Stack();
$hand = null;
//remove all white-space
$infix = preg_replace("/\s/", "", $infix);
if(NF_EOS_Parser::$debug) {
$hand=fopen("eq.txt","a");
}
//replace scientific notation with normal notation (2e-9 to 2*10^-9)
$infix = preg_replace('/([\d])([eE])(-?\d)/', '$1*10^$3', $infix);
if(NF_EOS_Parser::$debug) {
fwrite($hand, "$infix\n");
}
// Finds all the 'functions' within the equation and calculates them
// NOTE - when using function, only 1 set of parenthesis will be found, instead use brackets for sets within functions!!
//while((preg_match("/(". implode("|", $this->FNC) . ")\(([^\)\(]*(\([^\)]*\)[^\(\)]*)*[^\)\(]*)\)/", $infix, $match)) != 0) {
//Nested parenthesis are now a go!
while((preg_match("/(". implode("|", $this->FNC) . ")\(((?:[^()]|\((?2)\))*+)\)/", $infix, $match)) != 0) {
$func = $this->solveIF($match[2], $vArray);
switch($match[1]) {
case "cos":
$ans = cos($func);
break;
case "sin":
$ans = sin($func);
break;
case "tan":
$ans = tan($func);
break;
case "sec":
$tmp = cos($func);
if($tmp == 0) {
throw new Exception("Division by 0 on: 'sec({$func}) = 1/cos({$func})' in {$this->inFix}", NF_EOS_Parser::E_DIV_ZERO);
}
$ans = 1/$tmp;
break;
case "csc":
$tmp = sin($func);
if($tmp == 0) {
throw new Exception("Division by 0 on: 'csc({$func}) = 1/sin({$func})' in {$this->inFix}", NF_EOS_Parser::E_DIV_ZERO);
}
$ans = 1/$tmp;
break;
case "cot":
$tmp = tan($func);
if($tmp == 0) {
throw new Exception("Division by 0 on: 'cot({$func}) = 1/tan({$func})' in {$this->inFix}", NF_EOS_Parser::E_DIV_ZERO);
}
$ans = 1/$tmp;
break;
case "abs":
$ans = abs($func);
break;
case "log":
$ans = log($func);
if(is_nan($ans) || is_infinite($ans)) {
throw new Exception("Result of 'log({$func}) = {$ans}' is either infinite or a non-number in {$this->inFix}", NF_EOS_Parser::E_NAN);
}
break;
case "log10":
$ans = log10($func);
if(is_nan($ans) || is_infinite($ans)) {
throw new Exception("Result of 'log10({$func}) = {$ans}' is either infinite or a non-number in {$this->inFix}", NF_EOS_Parser::E_NAN);
}
break;
case "sqrt":
if($func < 0) {
throw new Exception("Result of 'sqrt({$func}) = i. We can't handle imaginary numbers", NF_EOS_Parser::E_NAN);
}
$ans = sqrt($func);
break;
default:
$ans = 0;
break;
}
$infix = str_replace($match[0], "({$ans})", $infix);
}
$infix = preg_replace('/[$&]/', "", $infix);
//Find all the variables that were passed and replaces them
while((preg_match('/([^a-zA-Z]){0,1}([a-zA-Z]+)([^a-zA-Z]){0,1}/', $infix, $match)) != 0) {
//remove notices by defining if undefined.
if(!isset($match[3])) {
$match[3] = "";
}
if(NF_EOS_Parser::$debug)
fwrite($hand, "{$match[1]} || {$match[3]}\n");
// Ensure that the variable has an operator or something of that sort in front and back - if it doesn't, add an implied '*'
if((!in_array($match[1], array_merge($this->ST, $this->ST1, $this->ST2, $this->SEP['open'])) && $match[1] != "") || is_numeric($match[1])) //$this->SEP['close'] removed
$front = "*";
else
$front = "";
if((!in_array($match[3], array_merge($this->ST, $this->ST1, $this->ST2, $this->SEP['close'])) && $match[3] != "") || is_numeric($match[3])) //$this->SEP['open'] removed
$back = "*";
else
$back = "";
//Make sure that the variable does have a replacement
//First check for pi and e variables that wll automagically be replaced
if(in_array(strtolower($match[2]), array('pi', 'e'))) {
$t = (strtolower($match[2])=='pi') ? pi() : exp(1);
$infix = str_replace($match[0], $match[1] . $front. $t. $back . $match[3], $infix);
} elseif(!isset($vArray[$match[2]]) && (!is_array($vArray != "") && !is_numeric($vArray) && 0 !== $vArray)) {
throw new Exception("Variable replacement does not exist for '". substr($match[0], 1, 1). $match[2] ."' in {$this->inFix}", NF_EOS_Parser::E_NO_VAR);
} elseif(!isset($vArray[$match[2]]) && (!is_array($vArray != "") && is_numeric($vArray))) {
$infix = str_replace($match[0], $match[1] . $front. $vArray. $back . $match[3], $infix);
} elseif(isset($vArray[$match[2]])) {
$infix = str_replace($match[0], $match[1] . $front. $vArray[$match[2]]. $back . $match[3], $infix);
}
}
if(NF_EOS_Parser::$debug)
fclose($hand);
return $this->solvePF($this->in2post($infix));
} //end function solveIF
/**
* Solve factorial (!)
*
* Will take any real positive number and solve for it's factorial. Eg.
* `5!` will become `1*2*3*4*5` = `120` For integers
* and
* 5.2! will become gamma(6.2) for non-integers
* DONE:
* Solve for non-integer factorials 2015/07/02
*
* @param Float $num Non-negative real number to get factorial of
* @throws Exception if number is at or less than 0
* @return Float Solved factorial
*/
protected function factorial($num) {
if($num < 0) {
throw new Exception("Factorial Error: Factorials don't exist for numbers < 0", NF_EOS_Parser::E_NAN);
}
//A non-integer! Gamma that sucker up!
if(intval($num) != $num) {
return $this->gamma($num + 1);
}
$tot = 1;
for($i=1;$i<=$num;$i++) {
$tot *= $i;
}
return $tot;
} //end function factorial
/**
* Gamma Function
*
* Because we can. This function exists as a catch-all for different
* numerical approx. of gamma if I decide to add any past Lanczos'.
* This method is public because a function doesn't currently exist
* within this parser to use it. That will change in the future.
*
* @param $z Number to compute gamma from
* @return Float The gamma (hopefully, I'll test it after writing the code)
*/
public function gamma($z)
{
return $this->laGamma($z);
}
/**
* Lanczos Approximation
*
* The Lanczos Approximation method of finding gamma values
*
* @link http://www.rskey.org/CMS/index.php/the-library/11
* @link http://algolist.manual.ru/maths/count_fast/gamma_function.php
* @link https://en.wikipedia.org/wiki/Lanczos_approximation
* @param float $z Number to obtain the gamma of
* @return float Gamma of inputted number
* @throws Exception if Number is less than or equal to 0
*/
protected function laGamma($z)
{
//check validity of $z, throw error if not a valid number to be used with gamma
if($z <= 0) {
throw new Exception("Gamma cannot be calculated on numbers less than or equal to 0", NF_EOS_Parser::E_NAN);
}
// Set up coefficients
$p = array(
0 => 1.000000000190015,
1 => 76.18009172947146,
2 => -86.50532032941677,
3 => 24.01409824083091,
4 => -1.231739572450155,
5 => 1.208650973866179E-3,
6 => -5.395239384953E-6
);
//formula:
// ((sqrt(2pi)/z)(p[0]+sum(p[n]/(z+n), 1, 6)))(z+5.5)^(z+0.5)*e^(-(z+5.5))
// Break it down now...
$g1 = sqrt(2*pi())/$z;
//Next comes our summation
$g2 =0;
for($n=1;$n<=6;$n++) {
$g2 += $p[$n]/($z+$n);
}
// Don't forget to add p[0] to it...
$g2 += $p[0];
$g3 = pow($z+5.5, $z + .5);
$g4 = exp(-($z+5.5));
//now just multiply them all together
$gamma = $g1 * $g2 * $g3 * $g4;
return $gamma;
}
} //end class 'Parser'
كتبت : فرح سمير بين دفء الصوت وبرود التقنية… أسامة منير يتحدث
“حين يُستنسخ الصوت.. هل تُستنسخ الروح؟”
“أسامة منير: الروح لا تسجل ب mp3 ولا ذكاء يعوّض دفء الصوت الإنساني
عندما يُذكر اسم الإذاعة في العالم العربى ، يتردد في الأذهان فورًا صوت الإعلامي القدير أسامة منير، صاحب المدرسة الخاصة في فن التقديم الإذاعي، والبصمة الإنسانية الواضحة في برامجه، وعلى رأسها البرنامج الأشهر “أنا والنجوم وهواك”. بصوته العذب وحضوره الإنساني، أصبح “ الغائب الحاضر ” في ذاكرة مستمعين تربّوا على نبرة صدقه ودفء كلماته.
وفي الوقت الذي تواصل فيه التكنولوجيا اقتحام ميادين الإعلام، أعلنت شركة Google في مايو 2025 عن ميزة “البودكاست الذكي” ضمن تطبيق Gemini، والتي تتيح للمستخدمين تحويل مستنداتهم إلى حلقات صوتية تفاعلية، تديرها شخصيتان ذكيتان تعملان بالذكاء الاصطناعي.
في هذا السياق، نتحاور اليوم مع الإعلامي أسامة منير حول هذه النقلة النوعية، ونبحث معه في سؤال جوهري: هل ما زال الصوت البشري الدافئ قادرًا على الصمود أمام زحف الذكاء الاصطناعي؟ كيف يمكن للإعلامي أن يتكيّف مع هذه الأدوات الجديدة، دون أن يفقد إنسانيته، أو يفرّط في جوهر الرسالة الإعلامية؟
في رأيك، هل البودكاست بصوت الذكاء الاصطناعي يمكن أن ينافس صوت وتجربة المذيع البشري في المستقبل؟
أعتقد أن البودكاست “لحم ودم”، لا يصح أن يكون بصوت الذكاء الاصطناعي أبدًا. لأنك إن قمتِ بتحضير الأسئلة وطرحتها بصوت الذكاء الاصطناعي، ثم جاءت الإجابات أيضًا من الذكاءالاصطناعي، فكأنك فقط تبحثين عن وسيلة لقراءة نص مكتوب. لكن الحوار الحقيقي يكون حيًا، عبارة عن تلاقٍ بين فكر وفكر، وعقل وعقل. يكون فيه أخذ وردّ، ولا يمكن أن يُدار بأي شكل من الأشكال عن طريق الذكاء الاصطناعي، لأنه ببساطة سيفقد “الروح”،وسيفقد “الطعم”، وحتى “ذكاء الحوار” نفسه.
لديك تاريخ طويل في البرامج الإذاعية المؤثرة.. هل تعتقد أن الذكاء الاصطناعي يمكن أن ينقل نفس المشاعر والدفء الذي يقدمه المذيع الحقيقي؟
أعتقد أن البرامج الإذاعية لا يمكن أن تُدار على الإطلاق بتقنيات الذكاء الاصطناعي، فهذا شيء بعيد تمامًا. لأن المذيع الذي يجلس أمام الميكروفون — والذي نسميه “الحديدة” —تنقل “الحديدة” هذه ليس فقط صوته، وإنما أيضًا إحساسه وأفكاره، ومشاعره من فرح أو غضب أو حماس هناك دفء وخصوصية في العلاقة الحوارية بين المذيع والمستمع، ولا أعتقد أن هذا يمكن أن نحصل عليه بأي حال من الأحوال من الذكاء الاصطناعي.
هل سبق أن جربت أي أدوات ذكاء اصطناعي في إعداد أو إنتاج محتوى صوتي أو بودكاست؟ وإن لم تفعل، هل تفكر باستخدامها مستقبلا ً ؟
نعم، بالفعل جربت، كنت أستطلع كيف يمكن إنتاج محتوى بالذكاء الاصطناعي، أو كيف يمكن أن يساعدني في إعداد أفكار إذاعية أو وضع محاور.وجدت أنه ببساطة يجمع كل ما هو موجود على الإنترنت، لكنه لا يبتكر. يعرض المتاح فقط، ولا يضيف عليه.
ونعم، قد نستخدمه أحيانًا في أعمال “الفويس أوفر”، لكن في البرامج الإذاعية، لا.. لم أستخدمه من قبل ولا أرى أنه يمكن أن يُستخدم.
فيه بودكاستات حاليًا تُنتَج بالكامل باستخدام الذكاء الاصطناعي.. من كتابة النص إلى صوت المذيع، وحتى تحرير الحلقات. هل ترى في ذلك فرصة لتطور الإعلام أم خطرًا على المهنة؟
كون أن هناك الآن بودكاست يُنتَج بالكامل بالذكاء الاصطناعي، لا أعتقد أنه يُعتبر بودكاست حقيقي. لأنه سيفتقد للروح. ما الفائدة أن أطلب من الذكاء الاصطناعي كتابة سكريبت، ثم يقرأه بصوت مذيع اصطناعي، ويضيف له موسيقى، وأرفعه على المنصة؟ لم أفعل شيئًا.
لو قلت له مثلا ً : “اعمل لي محاضرة أو بودكاست عن التعايش السلمي”، سيضع لي نقاطًا وشرحًا. ثم أطلب منه قراءتها، فيقرأها جميعًا بإضافة موسيقى خلفية، فأقوم بنشرها على الإنترنت. هل فعلت شيئًا؟ لا. هذا يمكن لأي شخص أن يقرؤه على الإنترنت. البودكاست في جوهره إنساني. الإنسان هو من يناقش، وله فكر وتصور ورؤية، وهذا لن تجده أبدًا عند الذكاء الاصطناعي. الذكاء الاصطناعي يجمع لك بيانات واقعية من الإنترنت، لكنه لا يخلق. سأضرب لكِ مثلا ً : هناك أجهزة حديثة الآن تنتج موسيقى كاملة من توزيع وتركيب إيقاعات وآلات. لكن هناك آلات موسيقية، لا يمكن أن تُعزف إلا “لايف” لأن عزفها الحقيقي يحمل طعمًا خاصًا.مثل الكمان، والتشيلو، والأكورديون. لا يمكن أن تُعزف من “كيبورد”، لأن الصوت يختلف تمامًا.
هل سبق أن تم استخدام نبرة صوتك المميزة في تقنيات الذكاء الاصطناعي؟ وإن حدث، فكيف كان شعورك عندما استمعت إليه؟
نعم، سمعت صوتي بالذكاء الاصطناعي. فى مرة أحد الموزعين الموسيقيين أرسل لي مقطعًا ساخرًا استخدم فيه صوتي في“فويس أوفر”، وقال لي ممازحًا: “أنا ممكن أستغل صوتك!” ضحكت، لم أزعل، لكن لاحظت أنه ربما أخذ نبرة صوتي، “التون” والموجة الصوتية كانت صحيحة، لكن مخارج الحروف كانت مختلفة، والأسلوب كان مختلفًا. لأن من قرأ هو المتحدث الحقيقي، لكنه فقط غيّر صوته ليصبح صوتي. أي أن الذكاء الاصطناعي أخرج صوتي، لكن بأسلوبه هو. فلم يكن “الفويس أوفر” حتى بأسلوبي أنا. فما بالك لو استُخدم هذا في الرد على الناس في حوارات وأسئلة؟ هناك شيئًا “بلاستيكيًا”، شيئًا غير حقيقي. ستشعرين أن مع أنه لم يكن سكريبتًا مكتوبًا، بل مجرد تعديل صوت. فلم يوصل لا المعنى، ولا الإحساس، ولا حتى التحفيز.وهنا نقطة مهمة أود أن أذكرها: “الفويس أوفر” في الإعلان، هو البائع، هو من يقدّم المنتج للمستهلك، هو من يقنعه به بأسلوب معين. والإقناع هذا موهبة من عند الله سبحانه وتعالى، والصوت المقبول كذلك نعمة من الله.لا يمكن لشيء صُنع بأيادٍ بشرية أن يضاهي ما خلقه الله.
ما رأيك في تأثير الذكاء الاصطناعي على فرص الشباب في دخول مجال البودكاست؟ هل يمكن أن يسهل الطريق، أم يقلل من قيمة التجربة والخبرة؟الذكاء الاصطناعي؟
أعتقد أنه سيؤثر على دخول الشباب لمجال الإعلام والبودكاست. وهناك خطورة أخرى أود أن أذكرها، لا أعلم إن كنتِ ستسألين عنها أم لا،لكن أي شخص يمكنه الآن إنشاء بودكاست أو حوار باستخدام الذكاء الاصطناعي، ويمكن أن يستخدم أصوات شخصيات عالمية، أو أصوات لمسؤولين، وقد يؤدي ذلك إلى كارثة سياسية. تخيلوا أحدهم يستخدم صوت مسؤول ويضعه في إجابات معينة بطريقة مزيفة، هذا قد يسبب أزمة سياسية خطيرة، حتى على المستوى المحلي.
اذا طلبت من حضرتك نصيحة لطلاب الإعلام الذين يرغبون في دخول مجال البودكاست، خاصة في ظل وجود الذكاء الاصطناعي، ماذا تقول لهم؟
أقول للشباب الذين يريدون دخول مجال البودكاست والعمل في الإعلام: الميديا تحتاج إلى الإنسان الذي يمتلك “ذكاء اجتماعي”، ويجيد فن الحوار، ويعرف كيف يأخذ ويعطي. لأن الكلام يجب أن يكون تبادليًا، لا مجرد “أنا أتكلم وأتكلم” دون أن أترك مجالا ً للرد. ويجب أن يكون لديه ثقافة، ليس بالضرورة تخصصًا، لكن يعرف بعض الأمور الطبية، بعض الأمور التاريخية، الاجتماعية، الفنية،حتى عندما يتحدث، يكون لديه خلفية، ويكون مدركًا لما يتحدث عنه، لا يبدو كمن يكتشف الكلام لأول مرة أما عن استغلال الذكاء الاصطناعي في البودكاست، فيمكن استخدامه في تأليف موسيقى تتر أو خلفيات صوتية. لكن بودكاست كامل بأفكاره وبنائه بالذكاء الاصطناعي؟ لا أعتقد أنه سيكون مبدعًا أبدًا. يجب أن يجتهد الإنسان قليلا ً ليخرج بشيء مميز. المذيع الذي يريد أن يتعلم الإذاعة، عليه أن يتعلمها. الإذاعة بسيطة وسهلة، لكنها تتطلب شيئين: الحرفية والموهبة. يجب تعلم الحرفة: طريقة الكلام، النقاش، تقسيم المحاور، احترام الرأي الآخر.. إلخ. لكن الموهبة هي التي تطغى على الحرفة، وهي من عند الله. الله يعطيها لإنسان معين، لا تُمنح لأي أحد.
هل ترى أن مستقبل الإعلام الصوتي سيبقى قائمًا على العنصر البشري، أم أن الذكاء الاصطناعي قد يستحوذ عليه؟
الإعلام الصوتي سيظل كما هو، إعلامًا صوتيًا. ما الفائدة من أن أستمع إلى الراديو وتكون كل برامجه مصنوعة بالذكاء الاصطناعي؟ الذكاء الاصطناعي قد يكون مناسبًا في تطبيقات قراءة الكتب، لكنها ستكون مملة، بدون روح، بدون إحساس. الإحساس الذي يصل إلى الإنسان لا يمكن أن ينقله الذكاء الاصطناعي. فأنا شخصيًا جربت كثيرًا، مثلا ً كنا نسجل مواد وثائقية “دوكيومنتريز”، وحاولت بعد تسجيلها أن أستخدم صوتي مع الذكاء الاصطناعي، لكن النتيجة كانت سيئة جدًا جدًا.
بين أصالة الصوت الإذاعي وذكاء الآلة، يبقى الإنسان هو العنصر الحاسم في صناعة المحتوى. الإعلامي القدير أسامة منير ذكّرنا أن التكنولوجيا أداة، وليست بديلا ً ، وأن الرسالة الصادقة لا تولد من الخوارزميات، بل من الإحساس بالناسوفي النهاية، قد تتغير الأدوات وتتطور الوسائل، لكن جوهر الإعلام الحقيقي يظل مرتبطًا بالصدق، والإحساس، والرسالة التي تمس ّ وجدان المتلقي. وبين الذكاء الاصطناعي وذكاء المشاعر، يبقى الخيار أمام الإعلامي: هل يكون مكمّلا ً للتكنولوجيا… أم تابعًا لها