diff --git a/menu.xml b/menu.xml index 1ed2c59..9d2b29e 100755 --- a/menu.xml +++ b/menu.xml @@ -94,11 +94,6 @@ - - - - - diff --git a/modules/text_to_wav/configs/default.conf.php b/modules/text_to_wav/configs/default.conf.php deleted file mode 100755 index e57ca23..0000000 --- a/modules/text_to_wav/configs/default.conf.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/modules/text_to_wav/help/en.hlp b/modules/text_to_wav/help/en.hlp deleted file mode 100755 index 5fe7f4e..0000000 --- a/modules/text_to_wav/help/en.hlp +++ /dev/null @@ -1,16 +0,0 @@ - -
- - -
- - -

{$node_name}

-

The option "Text to Wav" of the Menu "PBX" in Issabel allows transforming text to Audio. The output format of the file can be ".wav" or ".gsm". Write the message you want to transform, select the output format and click on "Generate Audio File" button. Automatically you will be asked to save the file in a location of your hard drive.

- -
-

Figure 1

-
- - - diff --git a/modules/text_to_wav/help/es.hlp b/modules/text_to_wav/help/es.hlp deleted file mode 100755 index 8acaa9c..0000000 --- a/modules/text_to_wav/help/es.hlp +++ /dev/null @@ -1,16 +0,0 @@ - -
- - -
- - -

{$node_name}

-

La opción "Texto a Wav" del menú Issabel permite transformar texto a audio resultando un archivo en formato WAV o GSM. Para llevar a cabo este proceso sólo escriba lo que desee transformar a audio en la caja de texto y haga click en el botón "Ejecutar". Automáticamente se le pedirá elegir la ubicación y el nombre para guardar el archivo generado.

- -
-

Figura 1

-
- - - diff --git a/modules/text_to_wav/images/es_hlp_text_to_wav.png b/modules/text_to_wav/images/es_hlp_text_to_wav.png deleted file mode 100755 index bc24a7d..0000000 Binary files a/modules/text_to_wav/images/es_hlp_text_to_wav.png and /dev/null differ diff --git a/modules/text_to_wav/images/hlp_text_to_wav.png b/modules/text_to_wav/images/hlp_text_to_wav.png deleted file mode 100755 index cb0670f..0000000 Binary files a/modules/text_to_wav/images/hlp_text_to_wav.png and /dev/null differ diff --git a/modules/text_to_wav/images/pbx_tools_text_to_wav.png b/modules/text_to_wav/images/pbx_tools_text_to_wav.png deleted file mode 100755 index 8c2baf0..0000000 Binary files a/modules/text_to_wav/images/pbx_tools_text_to_wav.png and /dev/null differ diff --git a/modules/text_to_wav/index.php b/modules/text_to_wav/index.php deleted file mode 100755 index 321481d..0000000 --- a/modules/text_to_wav/index.php +++ /dev/null @@ -1,175 +0,0 @@ -validateForm($_POST)) { - $smarty->assign("mb_title", _tr("Validation Error")); - $arrErrores = $oForm->arrErroresValidacion; - $strErrorMsg = ""._tr('The following fields contain errors').":
"; - if(is_array($arrErrores) && count($arrErrores) > 0){ - foreach($arrErrores as $k=>$v) { - $strErrorMsg .= "$k, "; - } - } - $smarty->assign("mb_message", $strErrorMsg); - $contenidoModulo = form_TexttoWav($smarty, $module_name, $local_templates_dir); - } else { - $smarty->assign("GENERATE", _tr("Generate")); - $smarty->assign("BACK", _tr("Back")); - $smarty->assign("icon", "modules/$module_name/images/pbx_tools_text_to_wav.png"); - $smarty->assign("FORMATO", getParameter('format')); - $smarty->assign("DOWNLOAD",_tr("Download File")); - $path = "var"; - $smarty->assign("PATH",$path); - - $format = getParameter('format'); - $language = getParameter('language'); - $message = stripslashes(trim(getParameter('message'))); - $message = substr($message, 0, 1024); - - $oTextToWap = new paloSantoTexttoWav(); - $execute = $oTextToWap->outputTextWave($format, $message, $language); - if ($execute) { - /* Cortar la salida en este lugar. Evita lidiar con rawmode sólo - * para caso de éxito */ - die(); - } else { - $smarty->assign("mb_title", _tr("Error")); - $smarty->assign("mb_message", $oTextToWap->errMsg); - } - - $htmlForm = $oForm->fetchForm("$local_templates_dir/form.tpl", _tr("Text to Wav"), $_POST); - $contenidoModulo = "
".$htmlForm."
"; - } - return $contenidoModulo; -} - - -function form_TexttoWav($smarty, $module_name, $local_templates_dir) -{ - $arrFormConference = createFieldForm(); - $oForm = new paloForm($smarty,$arrFormConference); - - $smarty->assign("GENERATE", _tr("Generate")); - $smarty->assign("icon", "modules/$module_name/images/pbx_tools_text_to_wav.png"); - $arrData['format'] = (getParameter("format"))?getParameter("format"):"wav"; - $arrData['language'] = (getParameter("language"))?getParameter("language"):"en-US"; - - $htmlForm = $oForm->fetchForm("$local_templates_dir/form.tpl", _tr("Text to Wav"), $arrData); - $contenidoModulo = "
".$htmlForm."
"; - - return $contenidoModulo; -} - - -function createFieldForm() -{ - $arrOptions = array('wav' => "wav", 'gsm' => "gsm"); - $arrOptionsLang = array( 'en-US'=>'en-US', 'es-ES'=>'es-ES', 'fr-FR'=>'fr-FR', 'it-IT'=>'it-IT','de-DE'=>'de-DE','en-GB'=>'en-GB' ); - - $arrFields = array( - "message" => array( "LABEL" => _tr("Message"), - "REQUIRED" => "yes", - "INPUT_TYPE" => "TEXTAREA", - "INPUT_EXTRA_PARAM" => "", - "VALIDATION_TYPE" => "text", - "EDITABLE" => "si", - "COLS" => "50", - "ROWS" => "4", - "VALIDATION_EXTRA_PARAM" => "" - ), - "format" => array( "LABEL" => _tr("Format"), - "REQUIRED" => "yes", - "INPUT_TYPE" => "RADIO", - "INPUT_EXTRA_PARAM" => $arrOptions, - "VALIDATION_TYPE" => "text", - "VALIDATION_EXTRA_PARAM" => "" - ), - "language" => array ( - "LABEL" => _tr("Language"), - "REQUIRED" => "yes", - "INPUT_TYPE" => "SELECT", - "INPUT_EXTRA_PARAM" => $arrOptionsLang, - "VALIDATION_TYPE" => "text", - "VALIDATION_EXTRA_PARAM" => "" - ), - ); - return $arrFields; -} - -function getAction() -{ - if(getParameter("show")) //Get parameter by POST (submit) - return "show"; - if(getParameter("generate")) - return "generate"; - if(getParameter("back")) - return "back"; - else if(getParameter("new")) - return "new"; - else if(getParameter("action")=="show") //Get parameter by GET (command pattern, links) - return "show"; - else - return "report"; -}?> diff --git a/modules/text_to_wav/lang/br.lang b/modules/text_to_wav/lang/br.lang deleted file mode 100644 index 54a92cc..0000000 --- a/modules/text_to_wav/lang/br.lang +++ /dev/null @@ -1,40 +0,0 @@ - "Gerar Arquivo de Audio", -"Format" => "Formato", -"Download File" => "Baixar Arquivo", -"Text to Wav" => "Texto para Wav", -"Unabled write file" => "Impossível salvar o arquivo", -"Unabled open file" => "Impossível abrir o arquivo", -"Unabled create file wav" => "Impossível criar arquivo wav", -"Unabled create file gsm" => "Impossível criar arquivo gsm", -"Not exists file" => "Arquivo não existe", -"Message" => "Texto para Converter", -"Back" => "Voltar", -); -?> diff --git a/modules/text_to_wav/lang/en.lang b/modules/text_to_wav/lang/en.lang deleted file mode 100644 index a37e2d8..0000000 --- a/modules/text_to_wav/lang/en.lang +++ /dev/null @@ -1,40 +0,0 @@ - "Generate Audio File", -"Format" => "Format", -"Download File" => "Download File", -"Text to Wav" => "Text to Wav", -"Unabled write file" => "Unabled to write file", -"Unabled open file" => "Unabled to open file", -"Unabled create file wav" => "Unabled to create file wav", -"Unabled create file gsm" => "Unabled to create file gsm", -"Not exists file" => "File doesn't exist", -"Message" => "Text to Convert", -"Back" => "Back", -); -?> diff --git a/modules/text_to_wav/lang/es.lang b/modules/text_to_wav/lang/es.lang deleted file mode 100644 index 274ab46..0000000 --- a/modules/text_to_wav/lang/es.lang +++ /dev/null @@ -1,37 +0,0 @@ - "Generar Archivo de Audio", - "Format" => "Formato", - "Download File" => "Descargar Archivo", - "Text to Wav" => "Texto a Wav", - "Unabled write file" => "No es posible escribir en el archivo", - "Unabled open file" => "No es posible abrir el archivo", - "Unabled create file wav" => "No es posible crear el archivo wav", - "Unabled create file gsm" => "No es posible crear el archivo gsm", - "Not exists file" => "No existe el archivo", - "Message" => "Texto a Convertir", - "Back" => "Regresar", -); -?> \ No newline at end of file diff --git a/modules/text_to_wav/lang/fa.lang b/modules/text_to_wav/lang/fa.lang deleted file mode 100644 index 23dc869..0000000 --- a/modules/text_to_wav/lang/fa.lang +++ /dev/null @@ -1,41 +0,0 @@ - "ساخت فايل صوتي", -"Format" => "فرمت", -"Download File" => "دانلود فايل", -"Text to Wav" => "متن به صدا", -"Unabled write file" => "خطا در ذخيره فايل", -"Unabled open file" => "خطا در باز كردن فايل", -"Unabled create file wav" => "خطا در ساختن فايل wav", -"Unabled create file gsm" => "خطا در ساختن فايل gsm", -"Not exists file" => "هيچ فايلي يافت نشد", -"Message" => "متن", -"Back" => "بازگشت", -); -?> diff --git a/modules/text_to_wav/lang/fr.lang b/modules/text_to_wav/lang/fr.lang deleted file mode 100644 index 82ba820..0000000 --- a/modules/text_to_wav/lang/fr.lang +++ /dev/null @@ -1,36 +0,0 @@ - "Générer un Fichier Audio", - "Download File" => "Télécharger un fichier", - "Text to Wav" => "Texte vers wav", - "Unabled write file" => "Incampable d'écrir le fichier", - "Unabled open file" => "Impossible d'ouvrir le fichier", - "Unabled create file wav" => "Impossible de créer le fichier wav.", - "Unabled create file gsm" => "Impossible de créer le fichier gsm.", - "Not exists file" => "Le fichier n'existe pas.", - "Message" => "Texte à convertir", - "Back" => "Retour", -); -?> \ No newline at end of file diff --git a/modules/text_to_wav/lang/ru.lang b/modules/text_to_wav/lang/ru.lang deleted file mode 100644 index c3481f6..0000000 --- a/modules/text_to_wav/lang/ru.lang +++ /dev/null @@ -1,36 +0,0 @@ - "Сгенерировать Аудио-файл", - "Format" => "Формат", - "Download File" => "Скачать Файл", - "Unabled write file" => "Не удалось записать файл", - "Unabled open file" => "Не удалось открыть файл", - "Unabled create file wav" => "Не удалось создать wav-файл", - "Unabled create file gsm" => "Не удалось создать gsm-файл", - "Not exists file" => "Файл не существует", - "Message" => "Текст для Конвертирования", - "Back" => "Назад", -); -?> \ No newline at end of file diff --git a/modules/text_to_wav/libs/paloSantoTexttoWav.class.php b/modules/text_to_wav/libs/paloSantoTexttoWav.class.php deleted file mode 100755 index 61822f4..0000000 --- a/modules/text_to_wav/libs/paloSantoTexttoWav.class.php +++ /dev/null @@ -1,76 +0,0 @@ - array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('file', '/tmp/stderr.txt', 'a'), - ); - $pipes = NULL; - //$sComando = '/usr/bin/text2wave -F 8000 -scale 4.0 -otype riff'; - $filename = uniqid(rand(), true) . '.wav'; - $command = '/usr/bin/pico2wave -l '.$voice.' -w /tmp/'.$filename.' "'.$message.'"'; - $ret = system($command); - - switch ($format) { - case 'gsm': - Header('Content-Type: audio/x-gsm'); - //$sComando .= ' | /usr/bin/sox -t wav - -r 8000 -t gsm -'; - $sComando = '/usr/bin/sox -t wav /tmp/'.$filename.' -r 8000 -t gsm -'; - break; - case 'wav': - default: - $format = 'wav'; - Header('Content-Type: audio/x-wav'); - $sComando = '/usr/bin/sox -t wav /tmp/'.$filename.' -r 8000 -t wav -'; - break; - } - Header('Content-Disposition: attachment; filename=tts.'.$format); - - $proc = proc_open($sComando, $pipespec, $pipes); - if (!is_resource($proc)) { - $this->errMsg = '(internal) Failed to open pipe for TTS'; - return FALSE; - } - fwrite($pipes[0], $message); - fclose($pipes[0]); - fpassthru($pipes[1]); - fclose($pipes[1]); - proc_close($proc); - unlink("/tmp/$filename"); - - return TRUE; - } -} -?> diff --git a/modules/text_to_wav/themes/default/form.tpl b/modules/text_to_wav/themes/default/form.tpl deleted file mode 100755 index 3d899b5..0000000 --- a/modules/text_to_wav/themes/default/form.tpl +++ /dev/null @@ -1,40 +0,0 @@ - - - {if $FILENAME} - - {else} - - - {/if} - -
- - {if !$FILENAME} -
- - - - - - - - - - - - - - - - -
{$message.LABEL}:{$message.INPUT}
{$format.LABEL}:{$format.INPUT}
{$language.LABEL}:{$language.INPUT}
- {else} - - - - -
{if $EXECUTE}{$DOWNLOAD} {$EXTENSION}{/if}
- - {/if} - -