Go to the source code of this file.
|
KRISP_AUDIO_API KrispAudioSessionID | krispAudioNcCreateSession (KrispAudioSamplingRate inputSampleRate, KrispAudioSamplingRate outputSampleRate, KrispAudioFrameDuration frameDuration, const char *modelName) |
| This function creates Speech Enhance(Noise Canceler NC) session object. More...
|
|
KRISP_AUDIO_API int | krispAudioNcCloseSession (KrispAudioSessionID pSession) |
| This function releases all data tied to this particular session, closes the given NC session. More...
|
|
KRISP_AUDIO_API int | krispAudioNcCleanAmbientNoiseInt16 (KrispAudioSessionID pSession, const short *pFrameIn, unsigned int frameInSize, short *pFrameOut, unsigned int frameOutSize) |
| This function cleans the ambient noise for the given single frame. Works with shorts (int16) with value in range [-2^15+1, 2^15] More...
|
|
KRISP_AUDIO_API int | krispAudioNcCleanAmbientNoiseFloat (KrispAudioSessionID pSession, const float *pFrameIn, unsigned int frameInSize, float *pFrameOut, unsigned int frameOutSize) |
| This function cleans the ambient noise for the given single frame. Works with floats with values normalized in range [-1,1] More...
|
|
◆ krispAudioNcCleanAmbientNoiseFloat()
KRISP_AUDIO_API int krispAudioNcCleanAmbientNoiseFloat |
( |
KrispAudioSessionID |
pSession, |
|
|
const float * |
pFrameIn, |
|
|
unsigned int |
frameInSize, |
|
|
float * |
pFrameOut, |
|
|
unsigned int |
frameOutSize |
|
) |
| |
This function cleans the ambient noise for the given single frame. Works with floats with values normalized in range [-1,1]
- Parameters
-
[in] | pSession | The NC Session to which the frame belongs |
[in] | pFrameIn | Pointer to input frame. It's a continuous buffer with overall size of frameDuration * inputSampleRate / 1000 |
[in] | frameInSize | This is input buffer size which must be frameDuration * inputSampleRate / 1000 |
[in,out] | pFrameOut | Processed frames. The caller should allocate a buffer of at least frameDuration * outputSampleRate / 1000 size |
[in] | frameOutSize | This is output buffer size which must be frameDuration * outputSampleRate / 100 |
- Return values
-
0 | success, negative on error |
◆ krispAudioNcCleanAmbientNoiseInt16()
KRISP_AUDIO_API int krispAudioNcCleanAmbientNoiseInt16 |
( |
KrispAudioSessionID |
pSession, |
|
|
const short * |
pFrameIn, |
|
|
unsigned int |
frameInSize, |
|
|
short * |
pFrameOut, |
|
|
unsigned int |
frameOutSize |
|
) |
| |
This function cleans the ambient noise for the given single frame. Works with shorts (int16) with value in range [-2^15+1, 2^15]
- Parameters
-
[in] | pSession | The NC Session to which the frame belongs |
[in] | pFrameIn | Pointer to input frame. It's a continuous buffer with overall size of frameDuration * inputSampleRate / 1000 |
[in] | frameInSize | This is input buffer size which must be frameDuration * inputSampleRate / 1000 |
[in,out] | pFrameOut | Processed frames. The caller should allocate a buffer of at least frameDuration * outputSampleRate / 1000 size |
[in] | frameOutSize | : this is output buffer size which must be frameDuration * outputSampleRate / 100 |
- Return values
-
0 | success, negative on error |
◆ krispAudioNcCloseSession()
This function releases all data tied to this particular session, closes the given NC session.
- Parameters
-
[in,out] | pSession | Handle to the NC session to be closed |
- Return values
-
0 | success, negative on error |
◆ krispAudioNcCreateSession()
This function creates Speech Enhance(Noise Canceler NC) session object.
Copyright Krisp, Inc
- Parameters
-
[in] | inputSampleRate | Sampling frequency of the input data |
[in] | outputSampleRate | Sampling frequency of the output data |
[in] | frameDuration | Frame duration |
[in] | modelName | The session ties to this model, and cleans the future frames using it. If modelName is nullptr than the sdk auto-detecs the model based on input sampleRate |
- Attention
- Always provide modelName explicitly to avoid ambiguity
- Returns
- created session handle