Skip to content

Commit

Permalink
Plugin: Text2Speech: Add README.md file and update lang variables - r…
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Mar 6, 2023
1 parent 689aa46 commit 247206e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
33 changes: 32 additions & 1 deletion plugin/text2speech/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
Text2Speech
======
===========

Version 0.1

This plugin adds the possibility (once setup with 3rd party account) to add
speech to learning paths by converting text in the learning paths to audio
files attached to each learning path item.

This plugin requires the *installation and configuration* of the TTS software
and data from Mozilla, which might be deterring to most users (sorry about
that). Please refer to https://github.com/mozilla/TTS/wiki on how to download,
install and configure your own TTS server.

It also requires the "AI Helper" plugin to be installed, enabled and properly
configured, as it connects to the learning path auto-generation feature to add
audio to it.

Once your TTS server is available, get a URL to connect to it, install and
enable the plugin, give it an API key (if any), a host (could be localhost)
and enable the plugin in the learning paths, then create a new learning
path using the AI Helper plugin in the learning path tool. You should now
get additional speech for every document in your learning path.

## Use a Mozilla TTS server

To mount your TTS server, you can use the Docker image from
[synesthesiam/docker-mozillatts](https://github.com/synesthesiam/docker-mozillatts).
Clone the repository and then run

```$ docker run -it -p 5002:5002 synesthesiam/mozillatts:<LANGUAGE>```

(where <LANGUAGE> is one of the supported languages (en, es, fr, de) for this image. If no language is given,
U.S. English is used). This image will serve the necessary API to configure in the plugin.

2 changes: 1 addition & 1 deletion plugin/text2speech/Text2SpeechPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function __construct()
$version = '0.1';
$author = 'Francis Gonzales';

$message = 'Description';
$message = '<p>'.$this->get_lang('plugin_comment').'</p>';

$settings = [
$message => 'html',
Expand Down
5 changes: 5 additions & 0 deletions plugin/text2speech/lang/english.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
$strings['plugin_comment'] = 'Plugin to convert text to speech using a 3rd-party service';
$strings['tool_enable'] = 'Enable plugin';

$strings['api_name'] = 'API';
$strings['api_key'] = 'API key';
$strings['url'] = 'URL of your Text2Speech server';
$strings['tool_lp_enable'] = 'Enable into the learning path';

$strings['GenerateAudioFromContent'] = 'Generate audio from content';
5 changes: 5 additions & 0 deletions plugin/text2speech/lang/french.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
$strings['plugin_comment'] = "Ce plugin permet de convertir du texte en parole à l'aide d'un service tiers";
$strings['tool_enable'] = 'Activer le plug-in';

$strings['api_name'] = 'API';
$strings['api_key'] = 'Clef API';
$strings['url'] = 'URL du serveur de Text2Speech';
$strings['tool_lp_enable'] = 'Activer dans les parcours';

$strings['GenerateAudioFromContent'] = 'Generate audio from content';
5 changes: 5 additions & 0 deletions plugin/text2speech/lang/spanish.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
$strings['plugin_comment'] = 'Este plugin es para convertir texto a voz usando un servicio de terceros';
$strings['tool_enable'] = 'Enable plugin';

$strings['api_name'] = 'API';
$strings['api_key'] = 'Clave API';
$strings['url'] = 'URL del servidor Text2Speech';
$strings['tool_lp_enable'] = 'Activar en las lecciones';

$strings['GenerateAudioFromContent'] = 'Generar audio desde el contenido';

0 comments on commit 247206e

Please sign in to comment.