#include <online-speex-wrapper.h>
Public Member Functions | |
OnlineSpeexEncoder (const SpeexOptions &config) | |
~OnlineSpeexEncoder () | |
void | AcceptWaveform (int32 sample_rate, const VectorBase< BaseFloat > &waveform) |
void | InputFinished () |
void | GetSpeexBits (std::vector< char > *spx_bits) |
Private Member Functions | |
void | Encode (const VectorBase< BaseFloat > &wave, std::vector< char > *speex_encoder_bits) |
Private Attributes | |
int32 | speex_frame_size_ |
int32 | speex_encoded_frame_size_ |
SPEEXBITS | speex_bits_ |
Vector< BaseFloat > | waveform_remainder_ |
std::vector< char > | speex_encoded_char_bits_ |
BaseFloat | sample_rate_ |
bool | input_finished_ |
Definition at line 74 of file online-speex-wrapper.h.
OnlineSpeexEncoder | ( | const SpeexOptions & | config | ) |
Definition at line 25 of file online-speex-wrapper.cc.
References KALDI_ERR, SpeexOptions::sample_rate, OnlineSpeexEncoder::sample_rate_, OnlineSpeexEncoder::speex_bits_, SpeexOptions::speex_bits_frame_size, OnlineSpeexEncoder::speex_encoded_frame_size_, OnlineSpeexEncoder::speex_frame_size_, SpeexOptions::speex_quality, and SpeexOptions::speex_wave_frame_size.
~OnlineSpeexEncoder | ( | ) |
void AcceptWaveform | ( | int32 | sample_rate, |
const VectorBase< BaseFloat > & | waveform | ||
) |
Definition at line 54 of file online-speex-wrapper.cc.
References VectorBase< Real >::Dim(), OnlineSpeexEncoder::Encode(), OnlineSpeexEncoder::input_finished_, KALDI_ERR, VectorBase< Real >::Range(), Vector< Real >::Resize(), OnlineSpeexEncoder::sample_rate_, OnlineSpeexEncoder::speex_encoded_char_bits_, and OnlineSpeexEncoder::waveform_remainder_.
Referenced by main().
|
private |
Definition at line 106 of file online-speex-wrapper.cc.
References VectorBase< Real >::Data(), VectorBase< Real >::Dim(), rnnlm::i, KALDI_ERR, kaldi::kCopyData, OnlineSpeexEncoder::speex_bits_, OnlineSpeexEncoder::speex_encoded_frame_size_, OnlineSpeexEncoder::speex_frame_size_, and OnlineSpeexEncoder::waveform_remainder_.
Referenced by OnlineSpeexEncoder::AcceptWaveform(), and OnlineSpeexEncoder::InputFinished().
|
inline |
Definition at line 84 of file online-speex-wrapper.h.
Referenced by main().
void InputFinished | ( | ) |
Definition at line 90 of file online-speex-wrapper.cc.
References OnlineSpeexEncoder::Encode(), OnlineSpeexEncoder::input_finished_, KALDI_ASSERT, VectorBase< Real >::Range(), OnlineSpeexEncoder::speex_encoded_char_bits_, OnlineSpeexEncoder::speex_encoded_frame_size_, and OnlineSpeexEncoder::waveform_remainder_.
Referenced by main().
|
private |
Definition at line 104 of file online-speex-wrapper.h.
Referenced by OnlineSpeexEncoder::AcceptWaveform(), and OnlineSpeexEncoder::InputFinished().
|
private |
Definition at line 103 of file online-speex-wrapper.h.
Referenced by OnlineSpeexEncoder::AcceptWaveform(), and OnlineSpeexEncoder::OnlineSpeexEncoder().
|
private |
Definition at line 94 of file online-speex-wrapper.h.
Referenced by OnlineSpeexDecoder::Decode(), OnlineSpeexEncoder::Encode(), OnlineSpeexDecoder::OnlineSpeexDecoder(), OnlineSpeexEncoder::OnlineSpeexEncoder(), OnlineSpeexDecoder::~OnlineSpeexDecoder(), and OnlineSpeexEncoder::~OnlineSpeexEncoder().
|
private |
Definition at line 101 of file online-speex-wrapper.h.
Referenced by OnlineSpeexEncoder::AcceptWaveform(), and OnlineSpeexEncoder::InputFinished().
|
private |
Definition at line 90 of file online-speex-wrapper.h.
Referenced by OnlineSpeexEncoder::Encode(), OnlineSpeexEncoder::InputFinished(), and OnlineSpeexEncoder::OnlineSpeexEncoder().
|
private |
Definition at line 89 of file online-speex-wrapper.h.
Referenced by OnlineSpeexDecoder::Decode(), OnlineSpeexEncoder::Encode(), OnlineSpeexDecoder::OnlineSpeexDecoder(), and OnlineSpeexEncoder::OnlineSpeexEncoder().
Definition at line 96 of file online-speex-wrapper.h.
Referenced by OnlineSpeexEncoder::AcceptWaveform(), OnlineSpeexEncoder::Encode(), and OnlineSpeexEncoder::InputFinished().