summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLTTSChunk.html
blob: 2590690973798029c2396ea40ee6e0662369ccde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<h1>SDLTTSChunk Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section--initWithText:type:">-initWithText:type:</a></li>
  <li><a href="#section-+textChunksFromString:">+textChunksFromString:</a></li>
  <li><a href="#section-+sapiChunksFromString:">+sapiChunksFromString:</a></li>
  <li><a href="#section-+lhPlusChunksFromString:">+lhPlusChunksFromString:</a></li>
  <li><a href="#section-+prerecordedChunksFromString:">+prerecordedChunksFromString:</a></li>
  <li><a href="#section-+silenceChunks">+silenceChunks</a></li>
  <li><a href="#section-text">text</a></li>
  <li><a href="#section-type">type</a></li>
</ul>

<h3>Overview</h3>

<p>Specifies what is to be spoken. This can be simply a text phrase, which SDL will speak according to its own rules. It can also be phonemes from either the Microsoft SAPI phoneme set, or from the LHPLUS phoneme set. It can also be a pre-recorded sound in WAV format (either developer-defined, or provided by the SDL platform).</p>

<p>In SDL, words, and therefore sentences, can be built up from phonemes and are used to explicitly provide the proper pronounciation to the TTS engine. For example, to have SDL pronounce the word <q>read</q> as <q>red</q>, rather than as when it is pronounced like <q>reed</q>, the developer would use phonemes to express this desired pronounciation.</p>

<p>For more information about phonemes, see <a href="http://en.wikipedia.org/wiki/Phoneme"><a href="http://en.wikipedia.org/wiki/Phoneme">http://en.wikipedia.org/wiki/Phoneme</a></a>.</p>

<p>Parameter List
  <table border="1" rules="all">
        <tr>
            <th>Name</th>
            <th>Type</th>
            <th>Description</th>
            <th>SmartDeviceLink Ver. Available</th>
        </tr>
        <tr>
            <td>text</td>
            <td>String</td>
            <td>Text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the <q>type</q> field.</td>
            <td>SmartDeviceLink 1.0</td>
        </tr>
        <tr>
            <td>type</td>
            <td>SpeechCapabilities</td>
            <td>Indicates the type of information in the <q>text</q> field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound). </td>
            <td>SmartDeviceLink 1.0</td>
        </tr>
  </table></p>

<p>@since SmartDeviceLink 1.0</p>


<section class="section task-group-section">
  <h3 id="section--initWithText:type:">
      -initWithText:type:
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithText</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">text</span> <span class="nf">type</span><span class="p">:(</span><span class="n"><a href="../Type Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span><span class="p">)</span><span class="nv">type</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="nf">init</span><span class="p">(</span><span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span><span class="p">)</span></code></pre>

  
  
  
  <h3 id="section-+textChunksFromString:">
      +textChunksFromString:
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">NSArray</span><span class="o">&lt;</span><span class="n">SDLTTSChunk</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nf">textChunksFromString</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">string</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">textChunks</span><span class="p">(</span><span class="n">from</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">SDLTTSChunk</span><span class="p">]</span></code></pre>

  
  
  
  <h3 id="section-+sapiChunksFromString:">
      +sapiChunksFromString:
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">NSArray</span><span class="o">&lt;</span><span class="n">SDLTTSChunk</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nf">sapiChunksFromString</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">string</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">sapiChunks</span><span class="p">(</span><span class="n">from</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">SDLTTSChunk</span><span class="p">]</span></code></pre>

  
  
  
  <h3 id="section-+lhPlusChunksFromString:">
      +lhPlusChunksFromString:
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">NSArray</span><span class="o">&lt;</span><span class="n">SDLTTSChunk</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nf">lhPlusChunksFromString</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">string</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">lhPlusChunks</span><span class="p">(</span><span class="n">from</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">SDLTTSChunk</span><span class="p">]</span></code></pre>

  
  
  
  <h3 id="section-+prerecordedChunksFromString:">
      +prerecordedChunksFromString:
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">NSArray</span><span class="o">&lt;</span><span class="n">SDLTTSChunk</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nf">prerecordedChunksFromString</span><span class="p">:(</span><span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">string</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">prerecordedChunks</span><span class="p">(</span><span class="n">from</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">SDLTTSChunk</span><span class="p">]</span></code></pre>

  
  
  
  <h3 id="section-+silenceChunks">
      +silenceChunks
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">+</span> <span class="p">(</span><span class="n">NSArray</span><span class="o">&lt;</span><span class="n">SDLTTSChunk</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="n">silenceChunks</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">silenceChunks</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">SDLTTSChunk</span><span class="p">]</span></code></pre>

  
  
  
  <h3 id="section-text">
      text
  </h3>
  
  <p>@abstract Text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the <q>type</q> field.</p>

<p>Required, Max length 500</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSString</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">text</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-type">
      type
  </h3>
  
  <p>@abstract The type of information in the <q>text</q> field (e.g. phrase to be spoken, phoneme specification, name of pre-recorded sound).</p>

<p>Required</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n"><a href="../Type Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span> <span class="n">_Nonnull</span> <span class="n">type</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight"><code><span class="k">var</span> <span class="nv">type</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
</section>