Skip to content

Instantly share code, notes, and snippets.

@shriphani
Created November 11, 2015 01:09
Show Gist options
  • Save shriphani/92c587ea4c32bafc9d97 to your computer and use it in GitHub Desktop.
Save shriphani/92c587ea4c32bafc9d97 to your computer and use it in GitHub Desktop.
%module webrtc_vad
%{
#define SWIG_FILE_WITH_INIT
#include "webrtc/common_audio/vad/include/webrtc_vad.h"
%}
%{
/* Include in the generated wrapper file */
typedef unsigned int size_t;
%}
%include "stdint.i"
%include "numpy.i"
%init %{
import_array();
%}
typedef unsigned int size_t;
%apply (const int16_t* IN_ARRAY1, unsigned int DIM1) {(const int16_t* audio_frame, size_t frame_length)};
%include "webrtc/common_audio/vad/include/webrtc_vad.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment