CTISetStdCspCallBack

⌘K
  1. Home
  2. CTI32 Legacy Articles
  3. CTISetStdCspCallBack

CTISetStdCspCallBack

Author’s note:  This article supports our legacy products.  At Inventive Labs, after two decades of providing telephony tools, we never stop supporting those who rely on our products to run their businesses.  We no longer recommend Dialogic. This article is for our customers who are using legacy equipment. For more information about these legacy products and where we are today, read  Ditch Dialogic & Convert to Voice Elements.

The CTISetStdCspCallBack function allows you to specify a callback/delegate for the CTI32 Engine to invoke during [[Continuous Speech Processing (CSP)]]. Once set, and during calls to CSP related functions, the voice data will be streamed to the callback specified in this function.

For example, if you wished to capture the voice stream spoken by the caller during CSP you would use this function to allow CTI32 to provide you the datastream. You could then save the datastream for further processing or possibly stream it elsewhere.

Signature

.NET

public static int SetStdCspCallBack(int chdev, [[CSPCB]] cb)

C++

int far pascal CTISetStdCspCallBack(int chdev, void* cb)

Parameters/Return Values

* chdev – Specifies the voice resource that this callback will apply to
* cb – Specifies the callback/delegate for the engine to call during streaming, or NULL to disable the callback.

This function returns an 0 if successful, and any other value if the function fails.
Notes/Related Information

See [[CSPCB]] for the signature of the callback/delegate.

You must ensure that the callback (especially in .NET) remains in scope (not garbage collected), during the time you have the callback set. If you are finished with the callback, reset the callback by calling this function again with a value of NULL.

Version Information

Introduced with version 4.5 of CTI32.


Customer Related Questions

”’Q:”’ I am assuming that the cti.SetStdCspCallBack call specifies the use of a CSP resource and that you must call it again in the finally to release it. Correct? As I move through my application should I make this call, do a play/recognize(or series of same), then make the call again to release the speech resource?

”’Ans:”’ ”Yes, the chdev specified must be a CSP capable voice resource. It is recommended that once you set the callback, that you reset it after you are finished using it. This will ensure that the engine doesn’t try to callback your code when you are not expecting it and throw an exception.

[[User:MonroeComstock|MonroeComstock]] 08:47, 14 December 2007 (PST)

Was this article helpful to you? No Yes

How can we help?