| | |
| | | Audio(int model_sample_rate,int data_type); |
| | | Audio(int model_sample_rate,int data_type, int size); |
| | | ~Audio(); |
| | | void ClearQueue(std::queue<AudioFrame*>& q); |
| | | void Disp(); |
| | | void WavResample(int32_t sampling_rate, const float *waveform, int32_t n); |
| | | bool LoadWav(const char* buf, int n_len, int32_t* sampling_rate); |
| | |
| | | if (speech_char != NULL) { |
| | | free(speech_char); |
| | | } |
| | | ClearQueue(frame_queue); |
| | | ClearQueue(asr_online_queue); |
| | | ClearQueue(asr_offline_queue); |
| | | } |
| | | |
| | | void Audio::ClearQueue(std::queue<AudioFrame*>& q) { |
| | | while (!q.empty()) { |
| | | AudioFrame* frame = q.front(); |
| | | delete frame; |
| | | q.pop(); |
| | | } |
| | | } |
| | | |
| | | void Audio::Disp() |