Skip to content

Commit b5a07b3

Browse files
committed
Changes done for v2.3.3.
1 parent cb7ae97 commit b5a07b3

File tree

19 files changed

+471
-136
lines changed

19 files changed

+471
-136
lines changed

com.ibm.streamsx.sttgateway/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changes
22

3+
## v2.3.3
4+
* May/10/2022
5+
* Added code and logic necessary to scale the VgwDataRouter to process more voice calls with reduced use of CPU cycles.
6+
* Filtered empty speech packets arrving from either SBC or Voice Gateway.
7+
* Added more metrics in the VoiceGatewaySource operator to be queryable via the Curl command.
8+
* Added a hostpool to place the speech processor jobs based on a custom host tag.
9+
* Activated the option to consider a single EOCS to be treated as the end of a voice call instead of two EOCS signals.
10+
* Added a feature to change VgwSessionLogging in the VoiceGatewaySource operator via the Curl command.
11+
312
## v2.3.2
413
* Jan/10/2022
514
* Fixed a problem where the call start date time values were not always correctly included in the STT result.

com.ibm.streamsx.sttgateway/com.ibm.streamsx.sttgateway.watson/IBMVoiceGatewaySource/IBMVoiceGatewaySource.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@
135135
<function>
136136
<description>Returns an rstring value indicating the IBM Voice Gateway session id that corresponds to the current output tuple.</description>
137137
<prototype><![CDATA[rstring getIBMVoiceGatewaySessionId()]]></prototype>
138+
</function>
139+
<function>
140+
<description>Returns an integer value indicating the unique sequence number of a voice call.</description>
141+
<prototype><![CDATA[int32 getCallSequenceNumber()]]></prototype>
138142
</function>
139143
<function>
140144
<description>Returns a boolean value to indicate if this is a customer's speech data or not.</description>

com.ibm.streamsx.sttgateway/com.ibm.streamsx.sttgateway.watson/IBMVoiceGatewaySource/IBMVoiceGatewaySource_cpp.cgt

Lines changed: 137 additions & 27 deletions
Large diffs are not rendered by default.

com.ibm.streamsx.sttgateway/com.ibm.streamsx.sttgateway.watson/IBMVoiceGatewaySource/IBMVoiceGatewaySource_h.cgt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
22
==============================================
33
# Licensed Materials - Property of IBM
4-
# Copyright IBM Corp. 2019, 2021
4+
# Copyright IBM Corp. 2019, 2022
55
==============================================
66
*/
77

88
/*
99
============================================================
1010
First created on: Sep/17/2019
11-
Last modified on: Sep/17/2021
11+
Last modified on: May/10/2022
1212
============================================================
1313
*/
1414

@@ -58,6 +58,8 @@ public:
5858
SPL::int64 vgwStaleSessionPurgeInterval;
5959
SPL::uint32 maxConcurrentCallsAllowed;
6060
SPL::uint32 activeConcurrentCallsCnt;
61+
SPL::uint32 peakConcurrentCallsCnt;
62+
SPL::uint32 emptySpeechPacketsCnt;
6163
bool ipv6Available;
6264
server_plain endpoint_plain;
6365
server_tls endpoint_tls;
@@ -155,6 +157,20 @@ public:
155157
// EndOfCall signal.
156158
std::map<std::string, SPL::list<int64_t>> vgw_session_id_map;
157159

160+
// This map's key is vgwSessionId and value is
161+
// a call sequence number of type int32_t.
162+
// This map stores the unique call sequence number generated and
163+
// assigned by this operator to every call.
164+
// This unique call sequence number can be used by the
165+
// downstream operators for whatever need they may have for it.
166+
// e-g: partition the voice call data based on this unique
167+
// number to distribute in a parallel region to achieve
168+
// even load distribution across all the parallel channels.
169+
std::map<std::string, int32_t> call_sequence_number_map;
170+
171+
// This counter is used to keep the call sequence number.
172+
int32_t callSequenceNumber;
173+
158174
// Custom metrics for this operator.
159175
Metric *nVoiceCallsProcessedMetric;
160176
Metric *nVoiceCallsThrottledMetric;
@@ -235,6 +251,7 @@ public:
235251
private:
236252
// These are the output attribute assignment functions for this operator.
237253
std::string getIBMVoiceGatewaySessionId(std::string const & vgwSessionId);
254+
int32_t getCallSequenceNumber(int32_t const & callSequenceNumber);
238255
bool isCustomerSpeechData(bool const & isThisSpeechDataFromCustomer);
239256
int32_t getTupleCnt(int32_t const & emittedTupleCnt);
240257
int32_t getTotalSpeechDataBytesReceived(int32_t const & totalSpeechDataBytesReceived);

com.ibm.streamsx.sttgateway/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
**Note:** This toolkit requires c++11 support.
1616
</description>
17-
<version>2.3.2</version>
17+
<version>2.3.3</version>
1818
<requiredProductVersion>4.2.1.6</requiredProductVersion>
1919
</identity>
2020
<dependencies>

samples/STTGatewayUtils/com.ibm.streamsx.sttgateway.utils/STTGatewayUtils.spl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
22
==============================================
33
# Licensed Materials - Property of IBM
4-
# Copyright IBM Corp. 2018, 2021
4+
# Copyright IBM Corp. 2018, 2022
55
==============================================
66
*/
77

88
/*
99
==============================================
1010
First created on: Nov/24/2020
11-
Last modified on: Sep/10/2021
11+
Last modified on: May/10/2022
1212

1313
This is a utility composite that will get used in the following applications.
1414

@@ -29,7 +29,8 @@ namespace com.ibm.streamsx.sttgateway.utils;
2929
// very important and the other ones are purely optional if some
3030
// scenarios really require them.
3131
// blob speech --> Speech fragments of a live conversation as captured and sent by the IBM Voice Gateway.
32-
// rstring vgwSessionId --> Unique identifier of a voice call.
32+
// rstring vgwSessionId --> Unique identifier of a voice call.
33+
// int32 callSequenceNumber --> Unique sequence number for a call.
3334
// boolean isCustomerSpeechData --> Every voice call will have a customer channel and an agent channel.
3435
// This attribute tells whether this output stream carries customer speech data or not.
3536
// int32 vgwVoiceChannelNumber --> This indicates the voice channel number i.e. 1 or 2.
@@ -51,14 +52,16 @@ namespace com.ibm.streamsx.sttgateway.utils;
5152
// int32 int32 speechProcessorId --> Id of the speech processor job that is analyzing the speech data.
5253
// int32 speechEngineId --> This attribute will be set in the speech processor job. (Please, read the comments there.)
5354
// int32 speechResultProcessorId --> This attribute will be set in the speech processor job. (Please, read the comments there.)
54-
type BinarySpeech_t = blob speech, rstring vgwSessionId, boolean isCustomerSpeechData,
55+
// int32 parallelChannel --> It indicates the parallel channel to be used in the vgwDataRouter job.
56+
type BinarySpeech_t = blob speech, rstring vgwSessionId, int32 callSequenceNumber, boolean isCustomerSpeechData,
5557
int32 vgwVoiceChannelNumber, boolean endOfCallSignal,
5658
rstring id, rstring callStartDateTime,
5759
int64 callStartTimeInEpochSeconds,
5860
rstring callerPhoneNumber, rstring agentPhoneNumber,
5961
rstring ciscoGuid, int32 speechDataFragmentCnt,
6062
int32 totalSpeechDataBytesReceived, int32 speechProcessorId,
61-
int32 speechEngineId, int32 speechResultProcessorId;
63+
int32 speechEngineId, int32 speechResultProcessorId,
64+
int32 parallelChannel;
6265

6366
// The following schema will be for the data being sent here by the
6467
// VgwDataRouter application. It sends us raw binary data which
@@ -70,7 +73,7 @@ type DataFromVgwRouter_t = int32 msgType, blob payload;
7073
// The following schema is for the call recording feature where we will
7174
// store the call metadata details for a specific voice channel of a given
7275
// voice call.
73-
type CallMetaData_t = rstring vgwSessionId, boolean isCustomerSpeechData,
76+
type CallMetaData_t = rstring vgwSessionId, int32 callSequenceNumber, boolean isCustomerSpeechData,
7477
int32 vgwVoiceChannelNumber, rstring callerPhoneNumber,
7578
rstring agentPhoneNumber, rstring ciscoGuid;
7679

@@ -110,7 +113,8 @@ type SendData_t = rstring strData, blob blobData;
110113

111114
// The following schema defines the required attributes for the input stream of
112115
// the WebSocketSink operator.
113-
type WebSocketSinkSendData_t = rstring strData, blob blobData, list<rstring> sendToUrlContextPaths;
116+
type WebSocketSinkSendData_t = rstring strData, blob blobData,
117+
list<rstring> sendToUrlContextPaths, int32 parallelChannel;
114118

115119
public composite STTGatewayUtils {
116120
graph

samples/STTGatewayUtils/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<info:identity>
55
<info:name>STTGatewayUtils</info:name>
66
<info:description>A utility composite used by the VgwDataRouter and the speech processor applications.</info:description>
7-
<info:version>1.0.3</info:version>
7+
<info:version>1.0.4</info:version>
88
<info:requiredProductVersion>4.2.1.6</info:requiredProductVersion>
99
</info:identity>
1010
<info:dependencies/>

samples/VgwDataRouter/com.ibm.streamsx.sttgateway.sample/VgwDataRouter.spl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/*
99
==============================================
1010
First created on: Nov/24/2020
11-
Last modified on: Sep/15/2021
11+
Last modified on: May/10/2022
1212

1313
A) What does this example application do?
1414
--------------------------------------
@@ -573,7 +573,17 @@ public composite VgwDataRouter {
573573
// whether it is sending binary speech data or an EOCS.
574574
if(BSD.endOfCallSignal == false) {
575575
// The incoming tuple contains binary speech data.
576-
//
576+
// If we are sent an empty speech blob, let us ignore that as
577+
// it will cause unwanted side effects in the downstream logic.
578+
if(blobSize(BSD.speech) <= 0ul) {
579+
appTrc(Trace.error,
580+
"_ZZZZZ Empty speech packet received for " +
581+
"vgwSessionId_vgwVoiceChannelNumber: " + _key +
582+
" We are going to ignore this packet by not sending it to" +
583+
" a speech processor.");
584+
return;
585+
}
586+
577587
// We have to first check if this speech data belongs to a
578588
// brand new voice call or an already ongoing voice call.
579589
if(has(_vgwSessionIdToSpeechProcessorMap, BSD.vgwSessionId) == false) {

samples/VgwDataRouter/info.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
<info:identity>
55
<info:name>VgwDataRouter</info:name>
66
<info:description>Example that shows how to route VGW speech data to different Speech processor jobs</info:description>
7-
<info:version>1.0.4</info:version>
7+
<info:version>1.0.5</info:version>
88
<info:requiredProductVersion>4.2.1.6</info:requiredProductVersion>
99
</info:identity>
1010
<info:dependencies>
1111
<info:toolkit>
1212
<common:name>com.ibm.streamsx.sttgateway</common:name>
13-
<common:version>[2.3.1,7.0.0]</common:version>
13+
<common:version>[2.3.3,7.0.0]</common:version>
1414
</info:toolkit>
1515
<info:toolkit>
1616
<common:name>com.ibm.streamsx.websocket</common:name>
1717
<common:version>[1.0.9,7.0.0]</common:version>
1818
</info:toolkit>
1919
<info:toolkit>
2020
<common:name>STTGatewayUtils</common:name>
21-
<common:version>[1.0.1,7.0.0]</common:version>
21+
<common:version>[1.0.4,7.0.0]</common:version>
2222
</info:toolkit>
2323
</info:dependencies>
2424
</info:toolkitInfoModel>

0 commit comments

Comments
 (0)