5.1.4 Sample VAD Scenarios
You can set VAD parameters and use the record/stream functions in different ways to achieve a specific purpose. The scenarios in Table5-2 are a few ways in which you might set the DM_VADEVTS, ECCH_VADINITIATED, DXCH_BARGEIN parameters and record/stream functions for use in your application.
- Note:
- This section does not discuss all available parameters for use with Continuous Speech Processing (CSP). Other parameters that may need to be set include DXCH_EC_TAP_LENGTH, ECCH_ECHOCANCELLER (on by default), and ECCH_XFERBUFFERSIZE, among others. For information on all parameters, see the ec_setparm( ) function description in the Continuous Speech Processing API Reference.
Table 5-2. Sample VAD Scenarios
ec_stream( ) or ec_reciottdata( ) P P P PECCH_VADINITIATED P PDXCH_BARGEIN P PDM_VADEVTS P PIn the table, the check mark denotes that the function is initiated or that the parameter is turned on. The "x" denotes that the parameter is turned off.
The following topics provide more information on the sample scenarios:
- Scenario A: Streaming with VAD
- Scenario B: Streaming with VAD and without VAD Event
- Scenario C: Streaming without VAD (Constant Streaming)
- Scenario D: Constant Streaming with VAD Event
5.1.4.1 Scenario A: Streaming with VAD
In scenario A shown in Table5-2, Sample VAD Scenarios, data is transmitted only after the VAD detects speech energy. The following takes place:
- The ec_stream( ) or ec_reciottdata( ) function is initiated in the application.
- After the VAD detects energy that meets certain predefined criteria (ECCH_VADINITIATED = 1):
- the firmware sends a VAD event notification to the host application (DM_VADEVTS bit is turned on).
- the prompt is terminated (DXCH_BARGEIN = 1).
- data streaming or recording begins.
- Note:
- On SpringWare boards, be aware that the timer on the DX_MAXTIME terminating condition (DV_TPT structure) begins when you initiate the ec_stream( ) or ec_reciottdata( ) function.
5.1.4.2 Scenario B: Streaming with VAD and without VAD Event
Scenario B, shown in Table5-2, Sample VAD Scenarios, is a variation of Scenario A. In this scenario, the following takes place:
- The ec_stream( ) or ec_reciottdata( ) function is initiated in the application.
- After the VAD detects energy that meets certain predefined criteria (ECCH_VADINITIATED = 1):
- the prompt is terminated (DXCH_BARGEIN = 1).
- data streaming or recording begins.
The difference between Scenario A and B is that in Scenario B, the VAD event bit (DM_VADEVTS) is turned off. The host application does not receive notification when the VAD detects energy. Note that the VAD event bit does not need to be set in order for barge-in and recording/streaming capability to be available.
- Note:
- On SpringWare boards, be aware that the timer on the DX_MAXTIME terminating condition (DV_TPT structure) begins when you initiate the ec_stream( ) or ec_reciottdata( ) function.
5.1.4.3 Scenario C: Streaming without VAD (Constant Streaming)
In scenario C shown in Table5-2, Sample VAD Scenarios, data is streamed at all times. The VAD, barge-in, and VAD event bit (voice event signaling) are turned off. The settings are as follows:
- The ec_stream( ) or ec_reciottdata( ) function is initiated in the application, and data streaming or recording begins.
- Voice-activated streaming/recording is not turned on (ECCH_VADINITIATED = 0).
- The firmware does not send a VAD event notification to the host application (DM_VADEVTS bit turned off).
- The prompt is not terminated when energy is detected (DXCH_BARGEIN = 0).
5.1.4.4 Scenario D: Constant Streaming with VAD Event
In scenario D shown in Table5-2, Sample VAD Scenarios, data is streamed at all times. When energy is detected, the firmware sends a VAD event notification to the host application. The VAD and barge-in are turned off. The settings are as follows:
- The ec_stream( ) or ec_reciottdata( ) function is initiated in the application, and data streaming or recording begins.
- Voice-activated streaming/recording is not turned on (ECCH_VADINITIATED = 0).
- The firmware sends a VAD event notification to the host application (DM_VADEVTS bit turned on).
- The prompt is not terminated when energy is detected (DXCH_BARGEIN = 0).
Click here to contact Dialogic Customer Engineering
Copyright 2001, Intel Corporation