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

digraph message_graph { fontname="Arial"; fontsize=11; stylesheet="../_static/graphs.css"; node [fontsize=11,fontname="Arial"] edge [fontsize=11,fontname="Arial"] "1" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction" TITLE="Structure rst.tts.TextToSpeechInstruction" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">TextToSpeechInstruction</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.text" TITLE="Field rst.tts.TextToSpeechInstruction.text" TARGET="_parent" PORT="text">text</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody" TITLE="Structure rst.tts.Prosody" TARGET="_parent">Prosody</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.prosody" TITLE="Field rst.tts.TextToSpeechInstruction.prosody" TARGET="_parent" PORT="prosody">prosody</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption" TITLE="Enum rst.tts.TextToSpeechInstruction.PlaybackOption" TARGET="_parent">PlaybackOption</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.playback_option" TITLE="Field rst.tts.TextToSpeechInstruction.playback_option" TARGET="_parent" PORT="playback_option">playback_option</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "4" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption" TITLE="Enum rst.tts.TextToSpeechInstruction.PlaybackOption" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/enum.svg"></IMG></TD><TD ALIGN="left">PlaybackOption</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.PLAY" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.PLAY" TARGET="_parent">PLAY</TD><TD ALIGN="right" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.PLAY" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.PLAY" TARGET="_parent">0</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.STOP" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.STOP" TARGET="_parent">STOP</TD><TD ALIGN="right" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.STOP" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.STOP" TARGET="_parent">1</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.PAUSE" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.PAUSE" TARGET="_parent">PAUSE</TD><TD ALIGN="right" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.PAUSE" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.PAUSE" TARGET="_parent">2</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.RESUME" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.RESUME" TARGET="_parent">RESUME</TD><TD ALIGN="right" HREF="../generated/stable/package-rst-tts.html#rst.tts.TextToSpeechInstruction.PlaybackOption.RESUME" TITLE="Value rst.tts.TextToSpeechInstruction.PlaybackOption.RESUME" TARGET="_parent">3</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "2" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody" TITLE="Structure rst.tts.Prosody" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">Prosody</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.Value" TITLE="Structure rst.tts.Prosody.Value" TARGET="_parent">Value</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.pitch" TITLE="Field rst.tts.Prosody.pitch" TARGET="_parent" PORT="pitch">pitch</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.Value" TITLE="Structure rst.tts.Prosody.Value" TARGET="_parent">Value</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.range" TITLE="Field rst.tts.Prosody.range" TARGET="_parent" PORT="range">range</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.Value" TITLE="Structure rst.tts.Prosody.Value" TARGET="_parent">Value</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.volume" TITLE="Field rst.tts.Prosody.volume" TARGET="_parent" PORT="volume">volume</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.duration" TITLE="Field rst.tts.Prosody.duration" TARGET="_parent" PORT="duration">duration</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.rate" TITLE="Field rst.tts.Prosody.rate" TARGET="_parent" PORT="rate">rate</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "3" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.Value" TITLE="Structure rst.tts.Prosody.Value" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">Value</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.Value.absolute" TITLE="Field rst.tts.Prosody.Value.absolute" TARGET="_parent" PORT="absolute">absolute</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.Value.relative" TITLE="Field rst.tts.Prosody.Value.relative" TARGET="_parent" PORT="relative">relative</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT32.html#FLOAT32" TITLE="Fundamental FLOAT32" TARGET="_parent">FLOAT32</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-tts.html#rst.tts.Prosody.Value.percentage" TITLE="Field rst.tts.Prosody.Value.percentage" TARGET="_parent" PORT="percentage">percentage</TD></TR></TABLE>>,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" []; }

clearer: should be made invisible via css

Message TextToSpeechInstruction

class rst.tts.TextToSpeechInstruction

Instructions to a Text-to-Speech module regarding the production of text.

Code author: Soeren Klett <sklett@techfak.uni-bielefeld.de>

Code author: Birte Carlmeyer <bcarlmey@techfak.uni-bielefeld.de>

text
Type:ASCII-STRING

The text to produce in case of PLAY. In all other cases this needs to be empty.

prosody
Type:rst.tts.Prosody

Prosody to be applied to everything contained in text.

playback_option
Type:rst.tts.TextToSpeechInstruction.PlaybackOption

Action to be executed by the Text-to-Speech engine.

Download this file

message TextToSpeechInstruction {

    /**
     * The text to produce in case of @ref .PlaybackOption.PLAY. In all
     * other cases this needs to be empty.
     */
    optional string text = 1;

    /**
     * Prosody to be applied to everything contained in @ref .text.
     */
    optional Prosody prosody = 2;

    /**
     * Possible actions the TTS engine has to perform.
     */
    enum PlaybackOption {

        /**
         * Produce the text given in @ref .text.
         * If TTS is already playing a text message, this command
         * should be ignored.
         */
        PLAY = 0;

        /**
         * Stop the current production and discard it.
         */
        STOP = 1;

        /**
         * Pause the current production. This allows to resume it using
         * @ref .RESUME.
         */
        PAUSE = 2;

        /**
         * Resume a previously pause text production.
         * If nothing has been paused before, this should be ignored.
         */
        RESUME = 3;

    }

    /**
     * Action to be executed by the Text-to-Speech engine.
     */
    optional PlaybackOption playback_option = 3 [default = PLAY];

}

Message PlaybackOption

class rst.tts.TextToSpeechInstruction.PlaybackOption

Possible actions the TTS engine has to perform.

PLAY
= 0

Produce the text given in text. If TTS is already playing a text message, this command should be ignored.

STOP
= 1

Stop the current production and discard it.

PAUSE
= 2

Pause the current production. This allows to resume it using RESUME.

RESUME
= 3

Resume a previously pause text production. If nothing has been paused before, this should be ignored.

Download this file

    enum PlaybackOption {

        /**
         * Produce the text given in @ref .text.
         * If TTS is already playing a text message, this command
         * should be ignored.
         */
        PLAY = 0;

        /**
         * Stop the current production and discard it.
         */
        STOP = 1;

        /**
         * Pause the current production. This allows to resume it using
         * @ref .RESUME.
         */
        PAUSE = 2;

        /**
         * Resume a previously pause text production.
         * If nothing has been paused before, this should be ignored.
         */
        RESUME = 3;

    }

Message Prosody

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.

Code author: Soeren Klett <sklett@techfak.uni-bielefeld.de>

Code author: Birte Carlmeyer <bcarlmey@techfak.uni-bielefeld.de>

pitch
Type:rst.tts.Prosody.Value

The baseline pitch for the contained words.

Absolute and relative values are expressed in Hz.

range
Type:rst.tts.Prosody.Value

The pitch range (variability) of the contained words.

Absolute and relative values are expressed in Hz.

volume
Type:rst.tts.Prosody.Value

The desired change of volume of the contained words.

Absolute and relative values are expressed in dB.

duration
Type:FLOAT32

Unit: second

Constraint: value >= 0

A value in seconds for the desired time to take to read the contained words.

rate
Type:FLOAT32

Constraint: value >= 0

Relative speech rate given as a percentage of the application-specific base rate.

Download this file

message Prosody {

    /**
     * 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.
     */
    message Value {

        /**
         * Absolute value in the target unit.
         */
        optional float absolute = 1;

        /**
         * Offset to an application-specific default value given in the
         * target unit.
         */
        optional float relative = 2;

        /**
         * Percentage of the application-specific default value.
         *
         * 100% equals 1.0.
         */
        // @constraint(value > 0)
        optional float percentage = 3 [default = 1];

    }

    /**
     * The baseline pitch for the contained words.
     *
     * Absolute and relative values are expressed in Hz.
     */
    optional Value pitch = 1;

    /**
     * The pitch range (variability) of the contained words.
     *
     * Absolute and relative values are expressed in Hz.
     */
    optional Value range = 2;

    /**
     * The desired change of volume of the contained words.
     *
     * Absolute and relative values are expressed in dB.
     */
    optional Value volume = 3;

    /**
     * A value in seconds for the desired time to take to read the
     * contained words.
     */
    // @unit(second)
    // @constraint(value >= 0)
    optional float duration = 4;

    /**
     * Relative speech rate given as a percentage of the
     * application-specific base rate.
     */
    // @constraint(value >= 0)
    optional float rate = 5 [default = 1];

}

Message Value

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.

absolute
Type:FLOAT32

Absolute value in the target unit.

relative
Type:FLOAT32

Offset to an application-specific default value given in the target unit.

percentage
Type:FLOAT32

Constraint: value > 0

Percentage of the application-specific default value.

100% equals 1.0.

Download this file

    message Value {

        /**
         * Absolute value in the target unit.
         */
        optional float absolute = 1;

        /**
         * Offset to an application-specific default value given in the
         * target unit.
         */
        optional float relative = 2;

        /**
         * Percentage of the application-specific default value.
         *
         * 100% equals 1.0.
         */
        // @constraint(value > 0)
        optional float percentage = 3 [default = 1];

    }