common.h 954 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
  11. #define MODULES_AUDIO_PROCESSING_VAD_COMMON_H_
  12. #include <stddef.h>
  13. static const int kSampleRateHz = 16000;
  14. static const size_t kLength10Ms = kSampleRateHz / 100;
  15. static const size_t kMaxNumFrames = 4;
  16. struct AudioFeatures {
  17. double log_pitch_gain[kMaxNumFrames];
  18. double pitch_lag_hz[kMaxNumFrames];
  19. double spectral_peak[kMaxNumFrames];
  20. double rms[kMaxNumFrames];
  21. size_t num_frames;
  22. bool silence;
  23. };
  24. #endif // MODULES_AUDIO_PROCESSING_VAD_COMMON_H_