-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[speechx]add linear spectrogram feature extractor #1400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
// limitations under the License. | ||
|
||
// wrap the fbank feat of kaldi, todo (SmileGoat) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header guard
public: | ||
explicit FbankExtractor(const FbankOptions& opts, | ||
share_ptr<FeatureExtractorInterface> pre_extractor); | ||
virtual void AcceptWaveform(const kaldi::Vector<kaldi::BaseFloat>& input) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input -> wave
|
||
class FeatureExtractorInterface { | ||
public: | ||
virtual void AcceptWaveform(const kaldi::Vector<kaldi::BaseFloat>& input) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input -> wave
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header guard
@@ -0,0 +1,39 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后面看下是否能放到 speehx/test 里,作为单侧
|
||
void SplitFeature(kaldi::Matrix<BaseFloat> feature, | ||
int32 chunk_size, | ||
std::vector<kaldi::Matrix<BaseFloat>> feature_chunks) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::vector<kaldi::Matrix> *
string utt = feature_reader.Key(); | ||
const kaldi::Matrix<BaseFloat> feature = feature_reader.Value(); | ||
vector<Matrix<BaseFloat>> feature_chunks; | ||
SplitFeature(feature, chunk_size, &feature_chunks); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decoder.InitDecoder(); 放这里
#include "base/basic_types.h" | ||
|
||
struct DecoderResult { | ||
BaseFloat acoustic_score; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
解码器的结果是 score=AMScore+LMScore+...
这个应该是解码器的total分数吧?
PR types
[New features]
PR changes
Describe
add linear feature extractor