mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
fix missing class exists check for transcribe engine (#7032)
Add a class_exists check to ensure transcribe engine exists before attempting the use of the class.
This commit is contained in:
@@ -232,14 +232,14 @@
|
||||
$transcribe_engine = $settings->get('transcribe', 'engine', '');
|
||||
|
||||
//add the transcribe object and get the languages arrays
|
||||
if (!empty($transcribe_engine)) {
|
||||
if (!empty($transcribe_engine) && class_exists($transcribe_engine)) {
|
||||
$transcribe = new transcribe($settings);
|
||||
}
|
||||
|
||||
//transcribe the voicemail recording
|
||||
$transcribe->audio_path = $email_attachment_path;
|
||||
$transcribe->audio_filename = $email_attachment_name;
|
||||
$transcribe_message = $transcribe->transcribe();
|
||||
//transcribe the voicemail recording
|
||||
$transcribe->audio_path = $email_attachment_path;
|
||||
$transcribe->audio_filename = $email_attachment_name;
|
||||
$transcribe_message = $transcribe->transcribe();
|
||||
}
|
||||
|
||||
echo "transcribe path: ".$email_attachment_path."\n";
|
||||
echo "transcribe name: ".$email_attachment_name."\n";
|
||||
|
||||
Reference in New Issue
Block a user