0001-Created-TextToSpeechInstruction.proto.patch

S.ör. Klett, 11/30/2015 04:11 PM

Download (4.43 KB)

View differences:

proto/sandbox/rst/tts/TextToSpeechInstruction.proto
1
package rst.tts;
2

  
3
option java_outer_classname = "TextToSpeechInstructionType";
4

  
5
/**
6
 * Instructions to a Text-to-Speech module regarding the production of
7
 * text.
8
 *
9
 * @author Soeren Klett <sklett@techfak.uni-bielefeld.de>
10
 * @author Birte Carlmeyer <bcarlmey@techfak.uni-bielefeld.de>
11
 */
12
message TextToSpeechInstruction {
13

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

  
20
    /**
21
     * Describes a prosody for an amount of text. It is assumed
22
     * that there are application-specific default values for all
23
     * aspects of the prosody (pitch, range, etc.). The prosody can be
24
     * expressed either in relation to the baseline values or with
25
     * absolute values.
26
     *
27
     * All aspects of the prosody are optional. In case an aspect is not
28
     * defined, an executing TTS engine can decide on these aspects.
29
     */
30
    message Prosody {
31

  
32
        /**
33
         * Specifies the value for a prosody aspect using multiple
34
         * possible formulations, which are represented by the different
35
         * attributes of the message.
36
         *
37
         * Exactly one of the attributes needs to be set.
38
         */
39
        message Value {
40

  
41
            /**
42
             * Absolut value in the target unit.
43
             */
44
            optional float absolute = 1;
45

  
46
            /**
47
             * Offset to an application-specific default value given in
48
             * the target unit.
49
             */
50
            optional float relative = 2;
51

  
52
            /**
53
             * Percentage of the application-specific default value.
54
             *
55
             * 100% equals 1.0.
56
             */
57
            // @constraint(value > 0)
58
            optional float percentage = 3 [default = 1];
59

  
60
        }
61

  
62
        /**
63
         * The baseline pitch for the contained words.
64
         *
65
         * Absolute and relative values are expressed in Hz.
66
         */
67
        optional Value pitch = 1;
68

  
69
        /**
70
         * The pitch range (variability) of the contained words.
71
         *
72
         * Absolute and relative values are expressed in Hz.
73
         */
74
        optional Value range = 2;
75

  
76
        /**
77
         * The desired change of volume of the contained words.
78
         *
79
         * Absolute and relative values are expressed in dB.
80
         */
81
        optional Value volume = 3;
82

  
83
        /**
84
         * A value in seconds for the desired time to take to read
85
         * the contained words.
86
         */
87
        // @unit(second)
88
        // @constraint(value >= 0)
89
        optional float duration = 4;
90

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

  
98
    }
99

  
100
    /**
101
     * Prosody to be applied to everything contained in @ref .text.
102
     */
103
    optional Prosody prosody = 2;
104

  
105
    enum PlaybackOption {
106

  
107
        /**
108
         * Produce the text given in @ref .text.
109
         * If TTS is already playing a text message, this command
110
         * should be ignored.
111
         */
112
        PLAY = 0;
113

  
114
        /**
115
         * Stop the current production and discard it.
116
         */
117
        STOP = 1;
118

  
119
        /**
120
         * Pause the current production. This allows to resume it using
121
         * @ref .RESUME.
122
         */
123
        PAUSE = 2;
124

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

  
131
    }
132

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

  
138
}
139

  
0
-