@@ -561,29 +561,6 @@ class RuntimeConfiguration(Configuration):
561561 .. versionadded:: 1.5.0
562562 """
563563
564- NUANCE_TTS_API_SLEEP = "nuance_tts_api_sleep"
565- """
566- Wait this number of seconds before the next HTTP POST request
567- to the Nuance TTS API.
568- This parameter can be used to throttle the HTTP usage.
569- It cannot be a negative value.
570-
571- Default: ``1.000``.
572-
573- .. versionadded:: 1.5.0
574- """
575-
576- NUANCE_TTS_API_RETRY_ATTEMPTS = "nuance_tts_api_retry_attempts"
577- """
578- Retry an HTTP POST request to the Nuance TTS API
579- for this number of times before giving up.
580- It must be an integer greater than zero.
581-
582- Default: ``5``.
583-
584- .. versionadded:: 1.5.0
585- """
586-
587564 SAFETY_CHECKS = "safety_checks"
588565 """
589566 If ``True``, perform safety checks on input files and parameters.
@@ -604,9 +581,10 @@ class RuntimeConfiguration(Configuration):
604581 Maximum length of the audio file of a Task, in seconds.
605582 If a Task has an audio file longer than this value,
606583 it will not be executed and an error will be raised.
607- Use ``0`` for disabling this check.
608584
609- Default: ``7200`` seconds.
585+ Use ``0`` to disable this check.
586+
587+ Default: ``0`` seconds.
610588
611589 .. versionadded:: 1.4.1
612590 """
@@ -617,7 +595,7 @@ class RuntimeConfiguration(Configuration):
617595 If a Task has more text fragments than this value,
618596 it will not be executed and an error will be raised.
619597
620- Use ``0`` for disabling this check.
598+ Use ``0`` to disable this check.
621599
622600 Default: ``0`` (disabled).
623601
@@ -670,6 +648,17 @@ class RuntimeConfiguration(Configuration):
670648 parameter if the command ``text2wave`` is not available in
671649 one of the directories listed in your ``PATH`` environment variable.
672650
651+ Specify the value
652+ :data:`~aeneas.synthesizer.Synthesizer.AWS` (``aws``)
653+ to use the built-in AWS Polly TTS API wrapper;
654+ you will need to provide your AWS API Access Key and Secret Access Key
655+ by either storing them on disk
656+ (e.g., in ``~/.aws/credentials`` and ``~/.aws/config``)
657+ or setting them in environment variables.
658+ Please refer to
659+ http://boto3.readthedocs.io/en/latest/guide/configuration.html
660+ for further details.
661+
673662 Specify the value
674663 :data:`~aeneas.synthesizer.Synthesizer.NUANCE` (``nuance``)
675664 to use the built-in Nuance TTS API wrapper;
@@ -691,6 +680,34 @@ class RuntimeConfiguration(Configuration):
691680 .. versionadded:: 1.5.0
692681 """
693682
683+ TTS_PATH = "tts_path"
684+ """
685+ Path to the TTS engine executable
686+ or the Python CustomTTSWrapper ``.py`` source file
687+ (see the ``aeneas/extra`` directory for examples).
688+
689+ You might need to use a full path,
690+ like ``/path/to/your/ttsengine`` or
691+ ``/path/to/your/ttswrapper.py``.
692+
693+ Default: ``None``, implying to use the default path
694+ defined by each TTS wrapper, if it calls the TTS engine
695+ via ``subprocess`` (otherwise it does not matter).
696+
697+ .. versionadded:: 1.5.0
698+ """
699+
700+ TTS_VOICE_CODE = "tts_voice_code"
701+ """
702+ The code of the TTS voice to use.
703+ If you specify this value, it will override the default voice code
704+ associated with the language of your text.
705+
706+ Default: ``None``.
707+
708+ .. versionadded:: 1.5.0
709+ """
710+
694711 TTS_CACHE = "tts_cache"
695712 """
696713 If set to ``True``, synthesize each distinct text fragment
@@ -712,30 +729,31 @@ class RuntimeConfiguration(Configuration):
712729 .. versionadded:: 1.6.0
713730 """
714731
715- TTS_PATH = "tts_path "
732+ TTS_API_SLEEP = "tts_api_sleep "
716733 """
717- Path to the TTS engine executable
718- or the Python CustomTTSWrapper ``.py`` source file
719- (see the ``aeneas/extra`` directory for examples).
734+ Wait this number of seconds before the next HTTP POST request
735+ to the Nuance TTS API.
736+ This parameter can be used to throttle the HTTP usage.
737+ It cannot be a negative value.
720738
721- You might need to use a full path,
722- like ``/path/to/your/ttsengine`` or
723- ``/path/to/your/ttswrapper.py``.
739+ Note that this parameter was called ``nuance_tts_api_sleep``
740+ before v1.7.0.
724741
725- Default: ``None``, implying to use the default path
726- defined by each TTS wrapper, if it calls the TTS engine
727- via ``subprocess`` (otherwise it does not matter).
742+ Default: ``1.000``.
728743
729744 .. versionadded:: 1.5.0
730745 """
731746
732- TTS_VOICE_CODE = "tts_voice_code "
747+ TTS_API_RETRY_ATTEMPTS = "tts_api_retry_attempts "
733748 """
734- The code of the TTS voice to use.
735- If you specify this value, it will override the default voice code
736- associated with the language of your text .
749+ Retry an HTTP POST request to the Nuance TTS API
750+ for this number of times before giving up.
751+ It must be an integer greater than zero .
737752
738- Default: ``None``.
753+ Note that this parameter was called ``nuance_tts_api_retry_attempts``
754+ before v1.7.0.
755+
756+ Default: ``5``.
739757
740758 .. versionadded:: 1.5.0
741759 """
@@ -926,12 +944,10 @@ class RuntimeConfiguration(Configuration):
926944
927945 (NUANCE_TTS_API_ID , (None , None , [], u"Nuance Developer API ID" )),
928946 (NUANCE_TTS_API_KEY , (None , None , [], u"Nuance Developer API Key" )),
929- (NUANCE_TTS_API_SLEEP , ("1.000" , TimeValue , [], u"sleep between Nuance API calls, in s" )),
930- (NUANCE_TTS_API_RETRY_ATTEMPTS , (5 , int , [], u"number of retries for a failed Nuance API call" )),
931947
932948 (SAFETY_CHECKS , (True , bool , [], u"if True, always perform safety checks" )),
933949
934- (TASK_MAX_AUDIO_LENGTH , ("7200. 0" , TimeValue , [], u"max length of single audio file, in s (0 to disable)" )),
950+ (TASK_MAX_AUDIO_LENGTH , ("0" , TimeValue , [], u"max length of single audio file, in s (0 to disable)" )),
935951 (TASK_MAX_TEXT_LENGTH , (0 , int , [], u"max length of single text file, in fragments (0 to disable)" )),
936952
937953 (TMP_PATH , (None , None , [], u"path to the temporary dir" )),
@@ -940,6 +956,8 @@ class RuntimeConfiguration(Configuration):
940956 (TTS_PATH , (None , None , [], u"path of the TTS executable/wrapper" )), # None (= default) or "espeak" or "/usr/bin/espeak"
941957 (TTS_VOICE_CODE , (None , None , [], u"overrides TTS voice code selected by language with this value" )),
942958 (TTS_CACHE , (False , bool , [], u"if True, cache synthesized audio files" )),
959+ (TTS_API_SLEEP , ("1.000" , TimeValue , [], u"sleep between TTS API calls, in s" )),
960+ (TTS_API_RETRY_ATTEMPTS , (5 , int , [], u"number of retries for a failed TTS API call" )),
943961
944962 (TTS_L1 , ("espeak" , None , [], u"TTS wrapper to use at level 1 (para)" )),
945963 (TTS_PATH_L1 , (None , None , [], u"path to level 1 (para) TTS executable/wrapper" )), # None (= default) or "espeak" or "/usr/bin/espeak"
0 commit comments