SpeexOptions Struct Reference

#include <online-speex-wrapper.h>

Collaboration diagram for SpeexOptions:

Public Member Functions

 SpeexOptions ()
 
void Register (OptionsItf *opts)
 

Public Attributes

BaseFloat sample_rate
 The sample frequency of the waveform, it decides which Speex mode to use. More...
 
int32 speex_quality
 Ranges from 0 to 10, the higher the quality is better. More...
 
int32 speex_bits_frame_size
 In bytes. More...
 
int32 speex_wave_frame_size
 In samples. More...
 

Detailed Description

Definition at line 36 of file online-speex-wrapper.h.

Constructor & Destructor Documentation

◆ SpeexOptions()

SpeexOptions ( )
inline

Definition at line 59 of file online-speex-wrapper.h.

59  : sample_rate(16000.0),
60  speex_quality(10),
62  speex_wave_frame_size(320) { }
int32 speex_wave_frame_size
In samples.
BaseFloat sample_rate
The sample frequency of the waveform, it decides which Speex mode to use.
int32 speex_quality
Ranges from 0 to 10, the higher the quality is better.
int32 speex_bits_frame_size
In bytes.

Member Function Documentation

◆ Register()

void Register ( OptionsItf opts)
inline

Definition at line 64 of file online-speex-wrapper.h.

References OptionsItf::Register().

Referenced by main().

64  {
65  opts->Register("sample-rate", &sample_rate, "Sample frequency of the waveform.");
66  opts->Register("speex-quality", &speex_quality, "Speex speech quality.");
67  opts->Register("speex-bits-frame-size", &speex_bits_frame_size,
68  "#bytes of each Speex compressed frame.");
69  opts->Register("speex-wave-frame-size", &speex_wave_frame_size,
70  "#samples of each waveform frame.");
71  }
int32 speex_wave_frame_size
In samples.
BaseFloat sample_rate
The sample frequency of the waveform, it decides which Speex mode to use.
int32 speex_quality
Ranges from 0 to 10, the higher the quality is better.
int32 speex_bits_frame_size
In bytes.

Member Data Documentation

◆ sample_rate

BaseFloat sample_rate

The sample frequency of the waveform, it decides which Speex mode to use.

Often 8kHz—> narrow band, 16kHz—> wide band and 32kHz —> ultra wide band

Definition at line 40 of file online-speex-wrapper.h.

Referenced by OnlineSpeexDecoder::OnlineSpeexDecoder(), and OnlineSpeexEncoder::OnlineSpeexEncoder().

◆ speex_bits_frame_size

int32 speex_bits_frame_size

In bytes.

Should be set according to speex_quality. Just name a few here(wideband): quality size(in bytes) 8 70 9 86 10 106

Definition at line 53 of file online-speex-wrapper.h.

Referenced by OnlineSpeexDecoder::OnlineSpeexDecoder(), and OnlineSpeexEncoder::OnlineSpeexEncoder().

◆ speex_quality

int32 speex_quality

Ranges from 0 to 10, the higher the quality is better.

In my preliminary tests with the RM recipe, if set it to 8, I observed the WER increased by 0.1%; while set it to 10, the WER almost kept unchanged.

Definition at line 45 of file online-speex-wrapper.h.

Referenced by OnlineSpeexDecoder::OnlineSpeexDecoder(), and OnlineSpeexEncoder::OnlineSpeexEncoder().

◆ speex_wave_frame_size

int32 speex_wave_frame_size

In samples.

The Speex toolkit uses a 20ms long window by default

Definition at line 57 of file online-speex-wrapper.h.

Referenced by OnlineSpeexDecoder::OnlineSpeexDecoder(), and OnlineSpeexEncoder::OnlineSpeexEncoder().


The documentation for this struct was generated from the following file: