Update include/ten_vad.h
Browse files- include/ten_vad.h +5 -3
include/ten_vad.h
CHANGED
|
@@ -39,7 +39,8 @@ extern "C"
|
|
| 39 |
* @param[in] hop_size The number of samples between the start points of
|
| 40 |
* two consecutive analysis frames. (e.g., 256).
|
| 41 |
* @param[in] threshold VAD detection threshold ranging from [0.0, 1.0]
|
| 42 |
-
*
|
|
|
|
| 43 |
* @return 0 on success, or -1 error occurs.
|
| 44 |
*/
|
| 45 |
TENVAD_API int ten_vad_create(ten_vad_handle_t *handle, size_t hop_size,
|
|
@@ -54,9 +55,10 @@ extern "C"
|
|
| 54 |
* buffer length must equal the hop size specified at ten_vad_create.
|
| 55 |
* @param[in] audio_data_length size of audio_data buffer, here should be equal to hop_size.
|
| 56 |
* @param[out] out_probability Pointer to a float (size 1) that receives the
|
| 57 |
-
* voice activity probability in the range [0.0, 1.0].
|
| 58 |
* @param[out] out_flag Pointer to an int (size 1) that receives the
|
| 59 |
-
*
|
|
|
|
| 60 |
* @return 0 on success, or -1 error occurs.
|
| 61 |
*/
|
| 62 |
TENVAD_API int ten_vad_process(ten_vad_handle_t handle, const int16_t *audio_data, size_t audio_data_length,
|
|
|
|
| 39 |
* @param[in] hop_size The number of samples between the start points of
|
| 40 |
* two consecutive analysis frames. (e.g., 256).
|
| 41 |
* @param[in] threshold VAD detection threshold ranging from [0.0, 1.0]
|
| 42 |
+
* This threshold is used to determine voice activity by comparing with the output probability.
|
| 43 |
+
* When probability >= threshold, voice is detected.
|
| 44 |
* @return 0 on success, or -1 error occurs.
|
| 45 |
*/
|
| 46 |
TENVAD_API int ten_vad_create(ten_vad_handle_t *handle, size_t hop_size,
|
|
|
|
| 55 |
* buffer length must equal the hop size specified at ten_vad_create.
|
| 56 |
* @param[in] audio_data_length size of audio_data buffer, here should be equal to hop_size.
|
| 57 |
* @param[out] out_probability Pointer to a float (size 1) that receives the
|
| 58 |
+
* voice activity probability in the range [0.0, 1.0], where higher values indicate higher confidence in voice presence.
|
| 59 |
* @param[out] out_flag Pointer to an int (size 1) that receives the
|
| 60 |
+
* binary voice activity decision: 0: no voice, 1: voice detected.
|
| 61 |
+
* This flag is set to 1 when out_probability >= threshold, and 0 otherwise.
|
| 62 |
* @return 0 on success, or -1 error occurs.
|
| 63 |
*/
|
| 64 |
TENVAD_API int ten_vad_process(ten_vad_handle_t handle, const int16_t *audio_data, size_t audio_data_length,
|