Krisp Audio SDK v6.0.0
Loading...
Searching...
No Matches
krisp-audio-sdk-vad.hpp
Go to the documentation of this file.
1
4
5#ifndef KRISP_AUDIO_SDK_VAD_HPP_
6#define KRISP_AUDIO_SDK_VAD_HPP_
7
8#include "krisp-audio-sdk.hpp"
9
13typedef enum {
14 BAND_WIDTH_UNKNOWN = 0,
15 BAND_WIDTH_4000HZ = 1,
16 BAND_WIDTH_8000HZ = 2,
17 BAND_WIDTH_16000HZ = 3,
18} KrispAudioBandWidth;
19
24typedef struct KrispAudioBandWidthInfo_t {
25 /* [out] Predicted real bandwidth, one of the @KrispAudioBandWidth values */
26 KrispAudioBandWidth realBandwidth;
27 /* [in] Algorithm processing start point */
28 int procStartDelayMs;
29 /* [in] Algorithm processing duration counted from the procStartDelayMs */
30 int procDurationMs;
31 int reserved;
32} KrispAudioBandWidthInfo;
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
51 KrispAudioFrameDuration frameDuration,
52 const char* modelName);
53
63
76 const short* pFrameIn,
77 unsigned int frameInSize);
78
91krispAudioVadFrameInt16Ex(KrispAudioSessionID pSession,
92 const short* pFrameIn,
93 unsigned int frameInSize,
94 KrispAudioBandWidthInfo& bandwidthInfo);
95
106KRISP_AUDIO_API float
108 const float* pFrameIn,
109 unsigned int frameInSize);
110
111
123KRISP_AUDIO_API float
124krispAudioVadFrameFloatEx(KrispAudioSessionID pSession,
125 const float* pFrameIn,
126 unsigned int frameInSize,
127 KrispAudioBandWidthInfo& bandwidthInfo);
128
129#ifdef __cplusplus
130}
131#endif /* __cplusplus */
132
133#endif
KRISP_AUDIO_API float krispAudioVadFrameFloat(KrispAudioSessionID pSession, const float *pFrameIn, unsigned int frameInSize)
This function processes the given frame and returns the VAD detection value. Works with float values ...
KRISP_AUDIO_API int krispAudioVadCloseSession(KrispAudioSessionID pSession)
This function releases all data tied to this particular session, closes the given VAD session.
KRISP_AUDIO_API KrispAudioSessionID krispAudioVadCreateSession(KrispAudioSamplingRate inputSampleRate, KrispAudioFrameDuration frameDuration, const char *modelName)
This function creates Voice Activity Detection session object ( VAD )
KRISP_AUDIO_API float krispAudioVadFrameInt16(KrispAudioSessionID pSession, const short *pFrameIn, unsigned int frameInSize)
This function processes the given frame and returns the VAD detection value. Works with shorts (int16...
#define KRISP_AUDIO_API
Definition: krisp-audio-sdk.hpp:29
KrispAudioSamplingRate
Definition: krisp-audio-sdk.hpp:35
void * KrispAudioSessionID
Definition: krisp-audio-sdk.hpp:33
KrispAudioFrameDuration
Definition: krisp-audio-sdk.hpp:45