Explorar o código

[Remove] Voxygen not supported anymore

monf %!s(int64=8) %!d(string=hai) anos
pai
achega
c32681d772

+ 2 - 2
Docs/neurons.md

@@ -156,10 +156,10 @@ neurons:
   - say:
     message:
       - "My name is Kalliope"
-    tts: "voxygen"
+    tts: "acapela"
 ```
 
-Here, the first neuron will use the default tts as set in the settings.yml file. The second neuron will use the tts "voxygen".
+Here, the first neuron will use the default tts as set in the settings.yml file. The second neuron will use the tts "acapela".
 
 >**Note:** The TTS must has been configured with its required parameters in the settings.yml file. See [TTS documentation](tts.md).
 

+ 2 - 2
Docs/settings.md

@@ -104,8 +104,8 @@ E.g
 text_to_speech:
   - pico2wave:
       language: "fr-FR"
-  - voxygen:
-      voice: "michel"
+  - googletts:
+      language: "fr"
 ```
 
 Some arguments are required, some other optional, please refer to the [TTS documentation](tts.md) to know available parameters for each supported TTS.

+ 0 - 3
Docs/tts.md

@@ -75,9 +75,6 @@ text_to_speech:
   - pico2wave:
       language: "fr-FR"
       cache: True
-  - voxygen:
-      voice: "Agnes"
-      cache: True
   - acapela:
       language: "sonid15"
       voice: "Manon"

+ 1 - 1
Docs/tts_list.md

@@ -12,7 +12,7 @@ Core TTSs are already packaged with the installation of Kalliope an can be used
 | GoogleTTS | [GoogleTTS](../kalliope/tts/googletts/README.md) | Cloud based |
 | VoiceRSS  | [VoiceRSS](../kalliope/tts/voicerss/README.md)   | Cloud based |
 | Pico2wave | [Pico2wave](../kalliope/tts/pico2wave/README.md) | Self hosted |
-| Voxygen   | [Voxygen](../kalliope/tts/voxygen/README.md)     | Cloud based |
+| ~~Voxygen~~ | ~~[Voxygen](../kalliope/tts/voxygen/README.md)~~ |~~Cloud based~~|
 
 ## Community TTS
 Community TTSs need to be installed manually.

+ 1 - 1
brain_examples/systemdate.yml

@@ -5,7 +5,7 @@
       - order: "quelle heure est-il"
     neurons:
       - systemdate:
-          tts: "voxygen"
+          tts: "acapela"
           say_template:
             - "il est {{ hours }} heure et {{ minutes }} minute"
 

+ 1 - 1
kalliope/core/TTS/TTSModule.py

@@ -114,7 +114,7 @@ class TTSModule(object):
         </path/in/settings>/<tts.name>/tts.parameter["language"]/tts.parameter["voice"]/<md5_of_sentence.tts
 
         E.g:
-        /tmp/kalliope/voxygene/fr/abcd12345.tts
+        /tmp/kalliope/acapela/fr/abcd12345.tts
 
         :return: path String
         """

+ 4 - 4
kalliope/settings.yml

@@ -56,14 +56,14 @@ cache_path: "/tmp/kalliope_tts_cache"
 # Text to Spreech engines configuration
 # Available engine are:
 # - pico2wave
-# - voxygen
+# - acapela
+# - pico2wave
+# - googletts
+# - voicerss
 text_to_speech:
   - pico2wave:
       language: "fr-FR"
       cache: True
-  - voxygen:
-      voice: "Agnes"
-      cache: True
   - acapela:
       language: "sonid15"
       voice: "Manon"

+ 0 - 11
kalliope/tts/voxygen/README.md

@@ -1,11 +0,0 @@
-### Voxygen
-
-This TTS is based on the demo of the [Voxygen engine](https://www.voxygen-group.com/)
-
-| Parameters | Required | Default | Choices                                                              | Comment                                                                                       |
-|------------|----------|---------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
-| voice      | yes      |         | [see the full list](https://www.voxygen-group.com/). Example: "Emma" | Do not set any accent. For Example the voice "Agnès" will be "Agnes" is the settings.yml file |
-| cache      | no       | TRUE    |                                                                      | True if you want to use the cache with this TTS                                               |
-
-
-

+ 0 - 1
kalliope/tts/voxygen/__init__.py

@@ -1 +0,0 @@
-from voxygen import Voxygen

+ 0 - 69
kalliope/tts/voxygen/voxygen.py

@@ -1,69 +0,0 @@
-import logging
-
-import requests
-
-from kalliope.core import FileManager
-from kalliope.core.TTS.TTSModule import TTSModule, MissingTTSParameter
-
-logging.basicConfig()
-logger = logging.getLogger("kalliope")
-
-TTS_URL = "https://www.voxygen.fr/sites/all/modules/voxygen_voices/assets/proxy/index.php"
-TTS_TIMEOUT_SEC = 30
-TTS_CONTENT_TYPE = "audio/mpeg"
-
-
-class Voxygen(TTSModule):
-
-    def __init__(self, **kwargs):
-        # voxygen does'nt need a language. The name of the voice correspond to a lang
-        super(Voxygen, self).__init__(language="any", **kwargs)
-
-        self.voice = kwargs.get('voice', None)
-        if self.voice is None:
-            raise MissingTTSParameter("voice parameter is required by the Voxygen TTS")
-
-    def say(self, words):
-        """
-        :param words: The sentence to say
-        """
-
-        self.generate_and_play(words, self._generate_audio_file)
-
-    def _generate_audio_file(self):
-        """
-        Generic method used as a Callback in TTSModule
-            - must provided the audio file and write it on the disk
-
-        .. raises:: FailToLoadSoundFile
-        """
-
-        payload = self.get_payload(self.voice, self.words)
-
-        # getting the mp3
-        r = requests.get(TTS_URL, params=payload, stream=True, timeout=TTS_TIMEOUT_SEC)
-        content_type = r.headers['Content-Type']
-
-        logger.debug("Voxygen : Trying to get url: %s response code: %s and content-type: %s",
-                     r.url,
-                     r.status_code,
-                     content_type)
-
-        if r.status_code == requests.codes.ok and content_type == TTS_CONTENT_TYPE:
-            FileManager.write_in_file(self.file_path, r.content)
-        else:
-            logger.debug("Unable to get a valid audio file. Returned code: %s" % r.status_code)
-
-    @staticmethod
-    def get_payload(voice, words):
-        """
-        Generic method used load the payload used to access the remote api
-
-        :return: Payload to use to access the remote api
-        """
-
-        return {
-            "method": "redirect",
-            "text": words,
-            "voice": voice
-        }