Ai elevenlabs io engine (#6932)

* allow settings to load domain and user settings

* ensure the engine is also enabled before attempting to create a new object

* add default values to stop undefined variable warnings

* enforce all models to set and return voices and languages

* enforce all models to set and return languages

* ensure speech_enabled is set by the current session

* create elevenlabs implementation of ai speech

* Update ai_elevenlabs.php
This commit is contained in:
frytimo
2024-03-30 17:16:16 -03:00
committed by GitHub
parent 883c32d932
commit 502ba07c53
6 changed files with 300 additions and 9 deletions

View File

@@ -384,6 +384,9 @@
}
}
//set the default value for speech
$speech_enabled = !empty($_SESSION['ai']['speech_enabled']['boolean']) && !empty($_SESSION['ai']['speech_engine']['text']);
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
@@ -502,7 +505,7 @@
foreach ($recordings as $row) {
//playback progress bar
if (permission_exists('recording_play')) {
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['recording_uuid'])."' onclick=\"recording_play('".escape($row['voicemail_greeting_uuid'])."')\" style='display: none;'><td id='playback_progress_bar_background_".escape($row['recording_uuid'])."' class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['recording_uuid'])."'></span></td><td class='description hide-sm-dn' style='border-bottom: none !important;'></td></tr>\n";
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['recording_uuid'])."' onclick=\"recording_play('".escape($row['voicemail_greeting_uuid'] ?? '')."')\" style='display: none;'><td id='playback_progress_bar_background_".escape($row['recording_uuid'])."' class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['recording_uuid'])."'></span></td><td class='description hide-sm-dn' style='border-bottom: none !important;'></td></tr>\n";
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
}
if (permission_exists('recording_edit')) {