Support resampling (#77)

This commit is contained in:
Fangjun Kuang
2023-03-03 16:42:33 +08:00
committed by GitHub
parent 5f31b22c12
commit 9d8fddef01
10 changed files with 96 additions and 26 deletions

View File

@@ -29,9 +29,11 @@ class FeatureExtractor {
~FeatureExtractor();
/**
@param sampling_rate The sampling_rate of the input waveform. Should match
the one expected by the feature extractor.
@param waveform Pointer to a 1-D array of size n
@param sampling_rate The sampling_rate of the input waveform. If it does
not equal to config.sampling_rate, we will do
resampling inside.
@param waveform Pointer to a 1-D array of size n. It must be normalized to
the range [-1, 1].
@param n Number of entries in waveform
*/
void AcceptWaveform(int32_t sampling_rate, const float *waveform, int32_t n);