23 #ifndef KALDI_ONLINE_ONLINE_AUDIO_SOURCE_H_ 24 #define KALDI_ONLINE_ONLINE_AUDIO_SOURCE_H_ 26 #ifndef KALDI_NO_PORTAUDIO 28 #include <portaudio.h> 29 #include <pa_ringbuffer.h> 31 #endif //KALDI_NO_PORTAUDIO 62 #ifndef KALDI_NO_PORTAUDIO 69 typedef ring_buffer_size_t
rbs_t;
83 const uint32 sample_rate,
85 const uint32 report_interval);
92 friend int PaCallback(
const void *input,
void *output,
93 long unsigned frame_count,
94 const PaStreamCallbackTimeInfo *time_info,
95 PaStreamCallbackFlags status_flags,
106 int Callback(
const void *input,
void *output,
107 ring_buffer_size_t frame_count,
108 const PaStreamCallbackTimeInfo *time_info,
109 PaStreamCallbackFlags status_flags);
129 int PaCallback(
const void *input,
void *output,
130 long unsigned frame_count,
131 const PaStreamCallbackTimeInfo *time_info,
132 PaStreamCallbackFlags status_flags,
134 #endif //KALDI_NO_PORTAUDIO 142 : src_(input), pos_(0) {}
155 #endif // KALDI_ONLINE_ONLINE_AUDIO_SOURCE_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
virtual bool Read(Vector< BaseFloat > *data)=0
PaUtilRingBuffer pa_ringbuf_
virtual ~OnlineAudioSourceItf()
#define KALDI_DISALLOW_COPY_AND_ASSIGN(type)
OnlineVectorSource(const VectorBase< BaseFloat > &input)
int PaCallback(const void *input, void *output, long unsigned frame_count, const PaStreamCallbackTimeInfo *time_info, PaStreamCallbackFlags status_flags, void *user_data)
A class representing a vector.
Provides a vector abstraction class.