OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // Frees the dynamic memory of a specified VAD instance. | 32 // Frees the dynamic memory of a specified VAD instance. |
33 // | 33 // |
34 // - handle [i] : Pointer to VAD instance that should be freed. | 34 // - handle [i] : Pointer to VAD instance that should be freed. |
35 void WebRtcVad_Free(VadInst* handle); | 35 void WebRtcVad_Free(VadInst* handle); |
36 | 36 |
37 // Initializes a VAD instance. | 37 // Initializes a VAD instance. |
38 // | 38 // |
39 // - handle [i/o] : Instance that should be initialized. | 39 // - handle [i/o] : Instance that should be initialized. |
40 // | 40 // |
41 // returns : 0 - (OK), | 41 // returns : 0 - (OK), |
42 // -1 - (NULL pointer or Default mode could not be set). | 42 // -1 - (null pointer or Default mode could not be set). |
43 int WebRtcVad_Init(VadInst* handle); | 43 int WebRtcVad_Init(VadInst* handle); |
44 | 44 |
45 // Sets the VAD operating mode. A more aggressive (higher mode) VAD is more | 45 // Sets the VAD operating mode. A more aggressive (higher mode) VAD is more |
46 // restrictive in reporting speech. Put in other words the probability of being | 46 // restrictive in reporting speech. Put in other words the probability of being |
47 // speech when the VAD returns 1 is increased with increasing mode. As a | 47 // speech when the VAD returns 1 is increased with increasing mode. As a |
48 // consequence also the missed detection rate goes up. | 48 // consequence also the missed detection rate goes up. |
49 // | 49 // |
50 // - handle [i/o] : VAD instance. | 50 // - handle [i/o] : VAD instance. |
51 // - mode [i] : Aggressiveness mode (0, 1, 2, or 3). | 51 // - mode [i] : Aggressiveness mode (0, 1, 2, or 3). |
52 // | 52 // |
53 // returns : 0 - (OK), | 53 // returns : 0 - (OK), |
54 // -1 - (NULL pointer, mode could not be set or the VAD instance | 54 // -1 - (null pointer, mode could not be set or the VAD instance |
55 // has not been initialized). | 55 // has not been initialized). |
56 int WebRtcVad_set_mode(VadInst* handle, int mode); | 56 int WebRtcVad_set_mode(VadInst* handle, int mode); |
57 | 57 |
58 // Calculates a VAD decision for the |audio_frame|. For valid sampling rates | 58 // Calculates a VAD decision for the |audio_frame|. For valid sampling rates |
59 // frame lengths, see the description of WebRtcVad_ValidRatesAndFrameLengths(). | 59 // frame lengths, see the description of WebRtcVad_ValidRatesAndFrameLengths(). |
60 // | 60 // |
61 // - handle [i/o] : VAD Instance. Needs to be initialized by | 61 // - handle [i/o] : VAD Instance. Needs to be initialized by |
62 // WebRtcVad_Init() before call. | 62 // WebRtcVad_Init() before call. |
63 // - fs [i] : Sampling frequency (Hz): 8000, 16000, or 32000 | 63 // - fs [i] : Sampling frequency (Hz): 8000, 16000, or 32000 |
64 // - audio_frame [i] : Audio frame buffer. | 64 // - audio_frame [i] : Audio frame buffer. |
(...skipping 12 matching lines...) Expand all Loading... |
77 // - frame_length [i] : Speech frame buffer length in number of samples. | 77 // - frame_length [i] : Speech frame buffer length in number of samples. |
78 // | 78 // |
79 // returns : 0 - (valid combination), -1 - (invalid combination) | 79 // returns : 0 - (valid combination), -1 - (invalid combination) |
80 int WebRtcVad_ValidRateAndFrameLength(int rate, size_t frame_length); | 80 int WebRtcVad_ValidRateAndFrameLength(int rate, size_t frame_length); |
81 | 81 |
82 #ifdef __cplusplus | 82 #ifdef __cplusplus |
83 } | 83 } |
84 #endif | 84 #endif |
85 | 85 |
86 #endif // WEBRTC_COMMON_AUDIO_VAD_INCLUDE_WEBRTC_VAD_H_ // NOLINT | 86 #endif // WEBRTC_COMMON_AUDIO_VAD_INCLUDE_WEBRTC_VAD_H_ // NOLINT |
OLD | NEW |