summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLAudioData.html
blob: ebc9fba1d2e867313d5728bde80b8d3f29503563 (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
199
200
201
202
203
204
205
206
<h1>SDLAudioData Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section-audioData">audioData</a></li>
  <li><a href="#section--initWithAudioFile:">-initWithAudioFile:</a></li>
  <li><a href="#section--initWithSpeechSynthesizerString:">-initWithSpeechSynthesizerString:</a></li>
  <li><a href="#section--initWithPhoneticSpeechSynthesizerString:phoneticType:">-initWithPhoneticSpeechSynthesizerString:phoneticType:</a></li>
  <li><a href="#section--init">-init</a></li>
  <li><a href="#section--addAudioFiles:">-addAudioFiles:</a></li>
  <li><a href="#section--addSpeechSynthesizerStrings:">-addSpeechSynthesizerStrings:</a></li>
  <li><a href="#section--addPhoneticSpeechSynthesizerStrings:phoneticType:">-addPhoneticSpeechSynthesizerStrings:phoneticType:</a></li>
</ul>

<h3>Overview</h3>

<p>Undocumented</p>


<section class="section task-group-section">
  <h3 id="section-audioData">
      audioData
  </h3>
  
  <p>The text-to-speech prompts that will used and/or audio files that will be played. The audio prompts and files will be played in the same order they are added.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">readonly</span><span class="p">,</span> <span class="n">nullable</span><span class="p">)</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLTTSChunk.html">SDLTTSChunk</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">audioData</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">audioData</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLTTSChunk.html">SDLTTSChunk</a></span><span class="p">]?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section--initWithAudioFile:">
      -initWithAudioFile:
  </h3>
  
  <p>Initialize with an SDLFile holding data or pointing to a file on the file system. When this object is passed to an <code>Alert</code> or <code>Speak</code>, the file will be uploaded if it is not already, then played if the system supports that feature.
@discussion Only available on systems supporting RPC Spec v5.0+</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithAudioFile</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/SDLFile.html">SDLFile</a></span> <span class="o">*</span><span class="p">)</span><span class="nv">audioFile</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="nv">audioFile</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLFile.html">SDLFile</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>audioFile</dt>
      <dd><p>The audio file to be played by the system</p></dd>
  </dl>
  
  <h3 id="section--initWithSpeechSynthesizerString:">
      -initWithSpeechSynthesizerString:
  </h3>
  
  <p>Initialize with a string to be spoken by the system speech synthesizer.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithSpeechSynthesizerString</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">spokenString</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="n">speechSynthesizerString</span> <span class="nv">spokenString</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>spokenString</dt>
      <dd><p>The string to be spoken by the system speech synthesizer</p></dd>
  </dl>
  
  <h3 id="section--initWithPhoneticSpeechSynthesizerString:phoneticType:">
      -initWithPhoneticSpeechSynthesizerString:phoneticType:
  </h3>
  
  <p>Initialize with a string to be spoken by the system speech synthesizer using a phonetic string.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span>
    <span class="nf">initWithPhoneticSpeechSynthesizerString</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">phoneticString</span>
                               <span class="nf">phoneticType</span><span class="p">:</span>
                                   <span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span><span class="p">)</span><span class="nv">phoneticType</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="n">phoneticSpeechSynthesizerString</span> <span class="nv">phoneticString</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">phoneticType</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>phoneticString</dt>
      <dd><p>The string to be spoken by the system speech synthesizer</p></dd>
      <dt>phoneticType</dt>
      <dd><p>Must be one of <code>SAPI_PHONEMES</code>, <code>LHPLUS_PHONEMES</code>, <code>TEXT</code>, or <code>PRE_RECORDED</code> or no object will be created</p></dd>
  </dl>
  
  <h3 id="section--init">
      -init
  </h3>
  
  <p>Undocumented</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="n">init</span> <span class="n">NS_UNAVAILABLE</span><span class="p">;</span></code></pre>

  
  
  
  
  <h3 id="section--addAudioFiles:">
      -addAudioFiles:
  </h3>
  
  <p>Add additional SDLFiles holding data or pointing to a file on the file system. When this object is passed to an <code>Alert</code> or <code>Speak</code>, the file will be uploaded if it is not already, then played if the system supports that feature.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">addAudioFiles</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLFile.html">SDLFile</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">audioFiles</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">addAudioFiles</span><span class="p">(</span><span class="n">_</span> <span class="nv">audioFiles</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLFile.html">SDLFile</a></span><span class="p">])</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>audioFiles</dt>
      <dd><p>An array of audio file to be played by the system</p></dd>
  </dl>
  
  <h3 id="section--addSpeechSynthesizerStrings:">
      -addSpeechSynthesizerStrings:
  </h3>
  
  <p>Create additional strings to be spoken by the system speech synthesizer.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">addSpeechSynthesizerStrings</span><span class="p">:</span>
    <span class="p">(</span><span class="n">nonnull</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n">NSString</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">spokenStrings</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">addSpeechSynthesizerStrings</span><span class="p">(</span><span class="n">_</span> <span class="nv">spokenStrings</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">])</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>spokenStrings</dt>
      <dd><p>The strings to be spoken by the system speech synthesizer</p></dd>
  </dl>
  
  <h3 id="section--addPhoneticSpeechSynthesizerStrings:phoneticType:">
      -addPhoneticSpeechSynthesizerStrings:phoneticType:
  </h3>
  
  <p>Create additional strings to be spoken by the system speech synthesizer using a phonetic string.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">addPhoneticSpeechSynthesizerStrings</span><span class="p">:</span>
            <span class="p">(</span><span class="n">nonnull</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n">NSString</span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">phoneticStrings</span>
                               <span class="nf">phoneticType</span><span class="p">:</span>
                                   <span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span><span class="p">)</span><span class="nv">phoneticType</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">addPhoneticSpeechSynthesizerStrings</span><span class="p">(</span><span class="n">_</span> <span class="nv">phoneticStrings</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">],</span> <span class="nv">phoneticType</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLSpeechCapabilities.h@T@SDLSpeechCapabilities">SDLSpeechCapabilities</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>phoneticStrings</dt>
      <dd><p>The strings to be spoken by the system speech synthesizer</p></dd>
      <dt>phoneticType</dt>
      <dd><p>Must be one of <code>SAPI_PHONEMES</code>, <code>LHPLUS_PHONEMES</code>, <code>TEXT</code>, or <code>PRE_RECORDED</code> or no object will be created</p></dd>
  </dl>
  
</section>