.. _package-rst-tts: ================= Package rst.tts ================= The tts (text to speech) package contains types describing the production of audio signals containing speech from textual representations of speech. Messages ======== .. container:: mess4ge-multi .. container:: mess4ge-graph .. digraph:: message_graph fontname="Arial"; fontsize=11; stylesheet="../_static/graphs.css"; node [fontsize=11,fontname="Arial"] edge [fontsize=11,fontname="Arial"] "1" [label=<
TextToSpeechInstruction
ASCII-STRINGtext
Prosodyprosody
PlaybackOptionplayback_option
>,shape=box,style=filled,fillcolor="white"]; "4" [label=<
PlaybackOption
PLAY0
STOP1
PAUSE2
RESUME3
>,shape=box,style=filled,fillcolor="white"]; "2" [label=<
Prosody
Valuepitch
Valuerange
Valuevolume
FLOAT32duration
FLOAT32rate
>,shape=box,style=filled,fillcolor="white"]; "3" [label=<
Value
FLOAT32absolute
FLOAT32relative
FLOAT32percentage
>,shape=box,style=filled,fillcolor="white"]; "1" -> "4" []; "1":playback_option -> "4" []; "1":prosody -> "2" []; "2" -> "3" []; "2":volume -> "3" []; "2":range -> "3" []; "2":pitch -> "3" []; .. container:: mess4ge-list .. container:: messages * :ref:`TextToSpeechInstruction ` * :ref:`Prosody ` .. container:: clearer clearer: should be made invisible via css .. _message-rst-tts-texttospeechinstruction: Message TextToSpeechInstruction ------------------------------- .. container:: message-rst-tts-texttospeechinstruction-multi .. container:: message-rst-tts-texttospeechinstruction-documentation .. py:class:: rst.tts.TextToSpeechInstruction Instructions to a Text-to-Speech module regarding the production of text. .. codeauthor:: Soeren Klett .. codeauthor:: Birte Carlmeyer .. py:attribute:: text :type: :py:class:`ASCII-STRING` The text to produce in case of :ref:`PLAY `. In all other cases this needs to be empty. .. py:attribute:: prosody :type: :py:class:`rst.tts.Prosody` Prosody to be applied to everything contained in :py:attr:`text `. .. py:attribute:: playback_option :type: :py:class:`rst.tts.TextToSpeechInstruction.PlaybackOption` Action to be executed by the Text-to-Speech engine. .. container:: message-rst-tts-texttospeechinstruction-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/tts/TextToSpeechInstruction.proto :lines: 16-65 :language: protobuf :emphasize-lines: 7-7,12-12,48-48 .. _message-rst-tts-texttospeechinstruction-playbackoption: Message PlaybackOption ---------------------- .. container:: message-rst-tts-texttospeechinstruction-playbackoption-multi .. container:: message-rst-tts-texttospeechinstruction-playbackoption-documentation .. py:class:: rst.tts.TextToSpeechInstruction.PlaybackOption Possible actions the TTS engine has to perform. .. py:attribute:: PLAY = 0 Produce the text given in :py:attr:`text `. If TTS is already playing a text message, this command should be ignored. .. py:attribute:: STOP = 1 Stop the current production and discard it. .. py:attribute:: PAUSE = 2 Pause the current production. This allows to resume it using :ref:`RESUME `. .. py:attribute:: RESUME = 3 Resume a previously pause text production. If nothing has been paused before, this should be ignored. .. container:: message-rst-tts-texttospeechinstruction-playbackoption-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/tts/TextToSpeechInstruction.proto :lines: 32-58 :language: protobuf :emphasize-lines: 8-8,13-13,19-19,25-25 .. _message-rst-tts-prosody: Message Prosody --------------- .. container:: message-rst-tts-prosody-multi .. container:: message-rst-tts-prosody-documentation .. py:class:: rst.tts.Prosody Describes a prosody for an amount of text. It is assumed that there are application-specific default values for all aspects of the prosody (pitch, range, etc.). The prosody can be expressed either in relation to the baseline values or with absolute values. All aspects of the prosody are optional. In case an aspect is not defined, an executing TTS engine can decide on these aspects. .. codeauthor:: Soeren Klett .. codeauthor:: Birte Carlmeyer .. py:attribute:: pitch :type: :py:class:`rst.tts.Prosody.Value` The baseline pitch for the contained words. Absolute and relative values are expressed in Hz. .. py:attribute:: range :type: :py:class:`rst.tts.Prosody.Value` The pitch range (variability) of the contained words. Absolute and relative values are expressed in Hz. .. py:attribute:: volume :type: :py:class:`rst.tts.Prosody.Value` The desired change of volume of the contained words. Absolute and relative values are expressed in dB. .. py:attribute:: duration :type: :py:class:`FLOAT32` **Unit**: second **Constraint**: ``value >= 0`` A value in seconds for the desired time to take to read the contained words. .. py:attribute:: rate :type: :py:class:`FLOAT32` **Constraint**: ``value >= 0`` Relative speech rate given as a percentage of the application-specific base rate. .. container:: message-rst-tts-prosody-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/tts/Prosody.proto :lines: 19-87 :language: protobuf :emphasize-lines: 38-38,45-45,52-52,60-60,67-67 .. _message-rst-tts-prosody-value: Message Value ------------- .. container:: message-rst-tts-prosody-value-multi .. container:: message-rst-tts-prosody-value-documentation .. py:class:: rst.tts.Prosody.Value Specifies the value for a prosody aspect using multiple possible formulations, which are represented by the different attributes of the message. Exactly one of the attributes needs to be set. .. py:attribute:: absolute :type: :py:class:`FLOAT32` Absolute value in the target unit. .. py:attribute:: relative :type: :py:class:`FLOAT32` Offset to an application-specific default value given in the target unit. .. py:attribute:: percentage :type: :py:class:`FLOAT32` **Constraint**: ``value > 0`` Percentage of the application-specific default value. 100% equals 1.0. .. container:: message-rst-tts-prosody-value-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/tts/Prosody.proto :lines: 28-49 :language: protobuf :emphasize-lines: 6-6,12-12,20-20