-
Notifications
You must be signed in to change notification settings - Fork 1
/
sttgateway-tech-brief.txt
524 lines (425 loc) · 28.7 KB
/
sttgateway-tech-brief.txt
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
============================================================
First created on: July/01/2018
Last modified on: May/16/2022
Purpose of this toolkit
-----------------------
The streamsx.sttgateway toolkit provides the following two operators
that can help you to integrate an IBM Streams applicaion with the
IBM Voice Gateway product v1.0.3.0 or higher
(https://www.ibm.com/support/knowledgecenter/SS4U29/whatsnew.html) at
the point of data ingestion and with the IBM Watson Speech To Text (STT)
cloud service (https://www.ibm.com/watson/services/speech-to-text/) at
the analytic stage(s) of that application pipeline.
1) IBMVoiceGatewaySource
2) WatsonSTT
IBMVoiceGatewaySource is a source operator that can be used to
ingest speech data from multiple live telephone conversations
happening between different pairs of speakers
e-g: customers and call center agents.
WatsonSTT is an analytic operator that can be used to transcribe
speech data into text either in real-time or in batch mode.
In a Streams application, these two operators can either be
used together or independent of each other. In a real-time
speech analytics scenario for transcribing live voice calls into
text, both of these operators can be used as part of a
Streams application graph. In a batch mode operation to
convert a set of prerecorded audio files stored in a
file system directory into text, WatsonSTT operator can be
used on its own in a Streams application graph. So, your
application requirements will determine whether you will need
only one or both of those operators.
This toolkit excels at ingesting speech data from an enterprise
telephony infrastructure and from audio files (wav, mp3 etc.) as well
as in sending the speech data to the Watson STT service and
get back the transcription results. Based on the user preference,
this toolkit is designed to work with the IBM Watson STT service
available on the IBM public cloud or on the hybrid cloud ready
IBM Cloud Pak for Data (CP4D). It uses the Websocket communication
API interface to interact with both the IBM Voice Gateway and
the Watson STT service. So, processing of the audio data either from
the real-time speech conversations or from the prerecorded speech
conversations that are stored in files can be accomplished by this toolkit.
Architectural patterns enabled by this toolkit
----------------------------------------------
1) For the real-time speech to text transcription, following are the possible architectural patterns.
a) Your Telephony SIPREC-->IBM Voice Gateway-->IBM Streams<-->Watson Speech To Text on IBM Public Cloud
b) Your Telephony SIPREC-->IBM Voice Gateway-->IBM Streams<-->Watson Speech To Text on IBM Cloud Pak for Data (CP4D)
c) Your Telephony SIPREC-->IBM Voice Gateway-->IBM Streams<-->Watson Speech To Text engine embedded inside an IBM Streams operator
2) For the batch (post call) speech to text transcription, following are the possible architectural patterns.
a) Speech data files in a directory-->IBM Streams<-->Watson Speech To Text on IBM Public Cloud
b) Speech data files in a directory-->IBM Streams<-->Watson Speech To Text on IBM Cloud Pak for Data (CP4D)
c) Speech data files in a directory-->IBM Streams<-->Watson Speech To Text engine embedded inside an IBM Streams operator
All-in-one Speech to text analytics, Call Recording and Call Replay
-------------------------------------------------------------------
As described above, Speech To Text is the core feature of this toolkit.
In addition, this toolkit enables call recording and call replay.
It includes two real-world tested examples that show how to do
live voice call recording and call replay from the pre-recorded calls.
Many other vendors provide proprietary, rigid black-box solutions for call recording
at a hefty price tag with either a non-existent or a minimal call replay facility.
But, this toolkit gives those two features for free in a completely open and
a flexible manner for users to beneift from them. Such a benefit allows customers
to control where the recorded data gets stored in a standard Mu-Law format as well as
accessing and using that data for their other purposes. All of them combined,
it is a compelling way in which the IBM Voice Gateway, IBM Streams and
IBM Watson Speech To Text offerings put the customer in the driver's seat to gather
real-time intelligence from their voice infrastructure.
A visual description of this toolkit's architecture
---------------------------------------------------
https://github.com/IBMStreams/streamsx.sttgateway/blob/develop/samples/VoiceGatewayToStreamsToWatsonSTT/etc/stt-arch.png
Technical positioning of this toolkit
-------------------------------------
At a very high level, this toolkit shares the same design goal as the other
IBM Streams toolkit named com.ibm.streams.speech2text to convert speech data
into text. But, they both work very differently to realize that design goal.
IBM Streams users can select either of these two toolkits depending on their
application and hardware infrastructure needs. So, it is important to know
the following major differences between these two toolkits before choosing
the suitable one for a given situation.
1) Namespace for them are different.
--> com.ibm.streams.speech2text.watson (Wraps Rapid libraries)
--> com.ibm.streamsx.sttgateway.watson (Invokes the IBM Watson STT cloud service)
2) Full scope versus partial scope speech analytics.
--> com.ibm.streams.speech2text.watson (Can only do speech to text)
--> com.ibm.streamsx.sttgateway.watson (Supports both
live speech data ingestion and speech to text)
3) Self contained versus external service invocation.
--> com.ibm.streams.speech2text is self contained. It includes
the speech to text core libraries and a small number of base language
model files that are necessary to do the speech to text conversion.
--> com.ibm.streamsx.sttgateway relies on an external
STT service. It contains the necessary code to communicate with
the external STT service to get the speech to text conversion done.
4) Speech data stays within your application versus going outside.
--> In com.ibm.streams.speech2text, audio content
will not have to go outside of this toolkit.
--> In com.ibm.streamsx.sttgateway, Audio content will
go outside of this toolkit via the network to the
external service that can run either on the IBM public cloud
or inside your own private network in a Cloud Pak for Data (CP4D) cluster.
5) Ease of customizing the LM and AM models.
--> In com.ibm.streams.speech2text, model customization
(for both LM and AM) requires the user to do the customization
on the IBM public cloud and then copy the generated
custom model patch files into the Streams machine so that they are
locally accessible by the Streams application.
--> In com.ibm.streamsx.sttgateway, LM and AM model
customization is done using the IBM cloud tools/infrastructure.
Such customized LM and AM models can be used via the
WatsonSTT operator parameters without a need to obtain the
copies of the generated custom model patch files into the
Streams application machine.
6) Ease of switching between different language models and minimizing toolkit upgrade cycles.
--> In com.ibm.streams.speech2text, it is necessary to
package relevant language base models (English, Spanish, French etc.) as
part of this toolkit. This also implies that a toolkit upgrade will be
needed for using newer versions of the models as well as the
newer versions of the speech engine libraries.
--> In com.ibm.streamsx.sttgateway, there is no packaging of
the language model files needed inside the toolkit.
Switching between different language models is simply
done through an operator parameter. There is no need to upgrade
this toolkit for using the newer versions of the models as well as
the newer versions of the speech engine libraries as they become
available in the external Watson STT service.
7) Ease of using different audio formats.
--> In com.ibm.streams.speech2text, it may be possible to
use only WAV formatted audio data.
--> In com.ibm.streamsx.sttgateway, any supported audio
format by the STT service can be used (mp3, WAV, FLAC, mulaw etc.)
8) Speech to text conversion performance.
--> In the lab tests, both toolkits seem to provide the same
level of performance in terms of the total time
taken to complete the transcription of the given audio content.
However, it is important to note that under certain
batch workloads, the com.ibm.streamsx.sttgateway seems to complete
the transcription faster than the com.ibm.streams.speech2text.
9) Operator names.
--> In com.ibm.streams.speech2text, WatsonS2T is the operator name.
--> In com.ibm.streamsx.sttgateway, IBMVoiceGatewaySource and
WatsonSTT are the operator names.
10) RPM dependency.
--> In com.ibm.streams.speech2text, atlas and atlas-devel
RPMs for Linux must be installed in all the
Streams machines where the WatsonS2T is running.
--> In com.ibm.streamsx.sttgateway, there is no such RPM dependency.
11) CPU core usage.
--> In com.ibm.streams.speech2text, every instance of the
WatsonS2T operator must run on its own PE (a.k.a Linux process).
Multiple instances of that operator can't be fused to
pack them into a single Linux process. This will
result in using many CPU cores when there is a need to
have a bank of WatsonS2T operators to achieve data parallelism.
--> In com.ibm.streamsx.sttgateway, there is no such
restriction to fuse multiple WatsonSTT operators into a
single PE (Linux process). This will result in the efficient
use of the CPU cores by requiring fewer CPU cores to have
a bank of WatsonSTT operators to achieve data parallelism.
12) Transcription result options.
--> In com.ibm.streams.speech2text, the WatsonS2T operator can
only return one full utterance at a time.
--> In com.ibm.streamsx.sttgateway, the WatsonSTT operator
can be configured at runtime to return one of the following as
transcription result.
1) Partial utterances as the transcription is in progress.
2) Only finalized a.k.a. completed utterances.
3) (default) Full text containing all the finalized
utterances after transcribing the entire audio.
13) Value added features.
--> In com.ibm.streams.speech2text, the WatsonS2T operator can
only provide the core speech to text capabilities.
--> In com.ibm.streamsx.sttgateway, the WatsonSTT operator
can optionally provide a few value added features in addition to
the core speech to text capabilities. Such features include
smart formatting, profanity filtering, keywords spotting etc.
14) Limited versus free availability
--> In com.ibm.streams.speech2text, the toolkit package containing the
WatsonS2T operator can be downloaded only by the customers
who possess active Streams licenses.
--> In com.ibm.streamsx.sttgateway, the toolkit package containing
the IBMVoiceGatewaySource and the WatsonSTT operators can be
downloaded by anyone for free from the IBMStreams GitHub web site.
Requirements for this toolkit
-----------------------------
There are certain important requirements that need to be satisfied in order to
use the IBM Streams STT Gateway toolkit in Streams applications.
Such requirements are explained below.
1. Network connectivity to the IBM Watson Speech To Text (STT) service running
either on the public cloud or on the Cloud Pak for Data (CP4D) is needed from
the IBM Streams Linux machines where this toolkit will be used. The
same is true to integrate with the IBM Voice Gateway product for the
use cases involving speech data ingestion for live voice calls.
2. This toolkit uses Websocket to communicate with the IBM Voice
Gateway and the Watson STT service. A valid IAM access token is needed
to use the Watson STT service on the public cloud and a valid access
token to use the Watson STT service on the CP4D.
So, users of this toolkit must provide their public cloud STT service instance's
API key or the CP4D STT service instance's access token when launching the Streams
application(s) that will have a dependency on this toolkit. When using the API key
from the public cloud, a utility SPL composite named IAMAccessTokenGenerator
available in this toolkit will be able to generate the IAM access token and then
subsequently refresh that token to keep it valid. A Streams application employing
this toolkit can make use of that utility composite to generate the necessary
IAM access token needed in the public cloud. Please do more reading about the
IAM access token from here:
https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-websockets#WSopen
3. On the IBM Streams application development machine (where the application code is
compiled to create the application bundle), it is necessary to install the toolkit.
The toolkit release bundle provides a mechanism via an ant script to get all the
required dependencies. Please note that such dependencies are not needed on the
Streams application execution machines.
4. On the IBM Streams application development machine the following toolkits are required:
* com.ibm.streamsx.websocket version 1.0.6 or higher
* com.ibm.streamsx.json version 1.4.6 or higher
* com.ibm.streamsx.websocket version 1.0.6 or higher
5. On the IBM Streams application machines, please ensure that the openssl and libcurl are
installed including the openssl-devel and libcurl-devel. This is required by the toolkit dependency to streamsx.websocket and the streamsx.inet toolkits. This is required
by this toolkit to generate and refresh and refresh the IAM access token which is a must
for the STT service on public cloud as well as for the TLS support.
6. For the IBM Streams and the IBM Voice Gateway products to work together,
certain configuration steps must be done as explained here.
a) In order to make the IBM Voice Gateway send the speech data from the
live voice calls, it is necessary to set the following environment variable in
the deployment configuration of the IBM Voice Gateway's SIP Orchestrator at the
time of deploying it.
{
"name": "SEND_SIPREC_METADATA_TO_STT",
"value": "true"
}
b) It is also necessary to set the following environment variable in the
IBM Voice Gateway's Media Relay deployment configuration to point to the
URL at which the IBMVoiceGatewaySource operator is running.
{
"name": "WATSON_STT_URL",
"value": "https://<IP-Address-Or-The-Streams-Machine-Name-Where-IBMVoiceGatewaySource-Is-Running>:<Port>"
}
c) It is necessary to create a self signed or Root CA signed TLS/SSL certificate
in PEM format and point to that certificate file at the time of starting the
IBM Streams application that invokes the IBMVoiceGatewaySource operator present
in this toolkit. If you don't want to keep pointing to your TLS/SSL certificate
file everytime you start the IBM Streams application, you can also copy the full
certificate file to your Streams application's etc directory as ws-server.pem
and compile your application which will then be used by default.
d) You should also extract just the certificate portion without your private key
from your full TLS/SSL certificate PEM file that you created in the previous step
and then create a security credential in the IBM Voice Gateway container as
explained in that product's documentation. After that, you should point to that
security credential in the deployment configuration of the IBM Voice Gateway's
Media Relay.
e) If you are comfortable with using a self signed TLS/SSL certificate file in
your environment, you can follow the instructions given in the following file
that is shipped with this toolkit to create your own self signed SSL certificate.
<YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VoiceGatewayToStreamsToWatsonSTT/etc/creating-a-self-signed-certificate.txt
Major external dependency for this toolkit
------------------------------------------
Bulk of the WebSocket logic in this toolkit's operator relies on the
following open source C++ WebSocket header only library.
https://github.com/zaphoyd/websocketpp
Much of the WebSocket logic here also follows the
WebSocket client and server usage techniques explained in the
sample code snippets from the above mentioned websocketpp URL.
A great source of learning for WebSocket++ is here:
https://docs.websocketpp.org/index.html
This toolkit requires the following two open source packages that are
not shipped with this toolkit due to the open source code distribution
policies. Users of this toolkit must first understand the usage clauses
stipulated by these two packages and then bring these open source packages
on their own inside of this toolkit as explained below. This needs to be
done only on the Linux machine(s) where the Streams application development
i.e. coding, compiling and SAB packaging is done. Only after doing that,
users can use this toolkit in their Streams applications.
1) boost_1_73_0
--> Obtain the official boost version boost_1_73_0 from here:
https://www.boost.org/users/history/version_1_73_0.html
--> A few .so files from the boost_1_73_0/lib directory are
copied into the lib directory of this toolkit.
(It is needed for the dynamic loading of these .so files
when the Streams application using this toolkit is launched.)
--> The entire boost_1_73_0/include directory is copied into
the include directory of this toolkit. [Around 200 MB in size]
(It is needed for a successful compilation of the
Streams application that uses this toolkit. Please note that
these include files will not bloat the size of that
application's SAB file since the include directory will not be
part of the SAB file.)
2) websocketpp v0.8.2
--> The entire websocketpp directory is copied into
the include directory of this toolkit. [Around 1.5 MB in size]
(It is needed for a successful compilation of the
Streams application that uses this toolkit. Please note that
these include files will not bloat the size of that
application's SAB file since the include directory will not be
part of the SAB file.)
3) Open SSL libraries in Linux
On all your IBM Streams development and application machines, you have to
ensure that the openssl-devel-1.0.2k-12 and openssl-libs-1.0.2k-12
(or a higher version) are installed. This can be verified via this command:
rpm -qa | grep -i openssl
4) Curl libraries in Linux
On all your IBM Streams development and application machines, you have to
ensure that the libcurl-devel-7.29.0-51.el7.x86_64 and libcurl-7.29.0-51.el7.x86_64
(or a higher version) are installed. This can be verified via this command:
rpm -qa | grep -i libcurl
Downloading the dependencies and building the toolkit
-----------------------------------------------------
This toolkit is packaged with a comprehensive build.xml automation file
that will help the users in downloading and building the toolkit in order to
make it ready for use. Users will need network connectivity to the Internet
from their Linux Streams application development machine(s) along with the
open source ant tool. All that a user needs to do is to download and extract
an official release version of this toolkit from the [IBMStreams GitHub]
(https://github.com/IBMStreams/streamsx.sttgateway/releases) and then run the
following commands in sequence from the top-level directory
(e-g: streamsx.sttgateway) of this toolkit.
ant clean-total [Approximately 2 minutes]
ant all [Approximately 8 minutes]
ant download-clean [Approximately 2 minutes]
If all those commands ran successfully, this toolkit is ready for use.
If there is no direct Internet access from the IBM Streams machine and
if there is a need to go through a proxy server, then the ant all command
may not work. In that case, you can try this command instead.
`ant all -Dwebsocket.archive=file://localhost$(pwd)/ext -Dwebsocket.version=0.8.2 -Dboost.archive.src0=file://localhost$(pwd)/ext/boost-install-files/boost_1_73_0.tar.gz`
A must do in the Streams applications that will use this toolkit
----------------------------------------------------------------
a) You must add this toolkit as a dependency in your application.
--> In Streams Studio, you can add this toolkit location in the
Streams Explorer view and then add this toolkit as a
dependency inside your application project's Dependencies section.
--> In a command line compile mode, simply add the -t option to
point to this toolkit's top-level or its parent directory.
--> This toolkit provides secure access to the STT service by
generating an IAM access token needed in the public cloud via a
utility SPL composite that can be invoked within a Streams application.
That composite IAMAccessTokenGenerator has a dependency on the
streamsx.json toolkit and to the streamsx.inet toolkit. So, it is necessary
to have the streamsx.json (v1.4.6 or higher) toolkit and the
streamsx.inet (v2.3.6 or higher) on your development machine where you
will build your application. In a command line compile mode, you
have to add the -t option to point to your streamsx.json and
streamsx.inet toolkit directories.
b) --> In Streams studio, you must double click on the BuildConfig of
your application's main composite and then select "Other" in the
dialog that is opened. In the "Additional SPL compiler options", you must add
the following.
--c++std=c++11
--> If you are building your application from the command line, please refer to the
Makefile provided in the AudioFileWatsonSTT example shipped with
this toolkit. Before using that Makefile, you must set the
STREAMS_STTGATEWAY_TOOLKIT environment variable to point to the full path of
your streamsx.sttgateway/com.ibm.streamsx.sttgateway directory. Similarly,
you must set the STREAMS_JSON_TOOLKIT environment variable to point to
the full path of your streamsx.json (v1.4.6 or higher) toolkit directory.
And, you must set the STREAMS_INET_TOOLKIT environment variable to point to
the full path of your streamsx.inet toolkit directory.
To build your own applications, you can do the same as done in that Makefile.
--> Please note that your IBM public cloud STT instance's API key will have to be
provided via a submission time parameter into your application so that
your API key can be used to generate a new IAM access token within
the utility composite IAMAccessTokenGenerator mentioned above.
Since the IAM access tokens will expire after a certain time period,
it is necessary to keep refreshing it periodically. That utility composite
does that as well. This API Key is needed only when using the STT service on
public cloud. If the STT service on the IBM Cloud Pak for Data (CP4D) is used,
then the API key is not needed. Instead, a never expiring access token
obtained from the CP4D STT service instance's web console should be used.
Common log messages generated by the Websocket library
------------------------------------------------------
There will be many log messages from the underlying C++ Websocket library
routinely getting written in the Streams WatsonSTT operator log files.
Such log messages are about making a connection to the Watson STT service,
disconnecting from the Watson STT service, receiving Websocket control frames
during the ongoing transcription etc. For example, in the absence of any
audio data available for transcription for a prolonged period (30 seconds or more),
the Watson STT service will terminate the Websocket connection to better utilize
its back-end resources. In that case, a set of messages as shown below will be logged.
[2018-08-11 10:07:35] [control] Control frame received with opcode 8
[2018-08-11 10:07:35] [application] Websocket connection closed with the Watson STT service.
[2018-08-11 10:07:35] [disconnect] Disconnect close local:[1011,see the previous message for the error details.] remote:[1011,see the previous message for the error details.]
These messages are normal and they don't reflect any error in the
Streams WatsonSTT operator. When the audio data becomes available later,
the WatsonSTT operator will reestablish the Websocket connection and continue
the transcription task. Only when you see any abnormal runtime exception
errors, you should take actions to diagnose and fix the problem.
Examples that showcase this toolkit's features
----------------------------------------------
This toolkit ships with the following examples that can be used as reference applications.
These examples showcase the full feature set of the IBMVoiceGatewaySource and the
WatsonSTT operators that are available within this toolkit. More details about these
examples can be obtained from the offical documentation for this toolkit.
If you have no need for the call recording and call replay features, you can use the
two examples below that end with the word Mini. It will cut down the extra logic to
result in a fewer number of overall operators.
1) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/AccessTokenGenerator
2) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/AudioFileWatsonSTT
3) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/AudioFileWatsonSTTAllOutput
4) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/AudioRawWatsonSTT
5) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/AudioRawWatsonSTTAllOutput
6) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VoiceGatewayToStreamsToWatsonSTT
7) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VoiceGatewayToStreamsToWatsonS2T
8) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/STTGatewayUtils
9) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VgwDataRouter
10) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VgwDataRouterToWatsonS2T
11) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VgwDataRouterToWatsonSTT
12) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VgwDataRouterMini
13) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VgwDataRouterToWatsonSTTMini
14) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/stt_restults_http_receiver
15) <YOUR_STTGATEWAY_TOOLKIT_HOME>/samples/VoiceDataSimulator
Importing this toolkit and its built-in examples into IBM Streams Studio
------------------------------------------------------------------------
1) Build the `streamsx.sttgateway` toolkit using the three ant commands mentioned in a previous section.
2) In Streams Studio, select `File->Import->IBM Streams Studio->SPL Project` and click `Next`.
3) In the resulting dialog box, click `Browse` and then select the `streamsx.sttgateway` directory from where you ran those ant commands.
4) Now, it should list the `com.ibm.streamsx.sttgateway` project which you must select and click `Finish`. It will take about 8 minutes to take a copy of that entire project into your Streams Studio workspace.
5) At this time, the `com.ibm.streamsx.sttgateway` project in your Streams Studio workspace is ready to be added as a dependency in any of your own applications that want to use the `IBMVoiceGatewaySource` and/or the `WatsonSTT` operators.
We will also show here the steps needed to import one of the built-in examples. You can use similar steps for other examples as well.
1) In Streams Studio, select `File->Import->IBM Streams Studio->SPL Project` and click `Next`.
2) In the resulting dialog box, click `Browse` and then select the `streamsx.sttgateway->samples` directory. (This is the location where you ran those ant commands earlier).
3) Now, it should list all the available examples from which you can select an example project that you want and click `Finish`.
4) You have to change the SPL build of the imported project from an External Builder to an Internal Builder. You can do that by right clicking on that imported project and then selecting `Configure SPL Build`. In the resulting dialog box, you can change the `Builder type` from an `External builder` to `Streams Studio internal builder`. Click `OK`.
5) Now, expand your imported top-level project, expand the namespace below it and then right-click the main composite name below it and select `New->Build Configuration`. (You have to do it for every main composite present in a given example.)
6) In the resulting dialog box, select Other and enter `--c++std=c++11` in the `Additional SPL compiler options` field. Click `OK`.
7) Your imported example project should build correctly now provided you meet all the other toolkit dependencies.
Official documentation for this toolkit
---------------------------------------
https://ibmstreams.github.io/streamsx.sttgateway/
============================================================