summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 066fa1d)
raw | patch | inline | side by side (parent: 066fa1d)
author | Xiaohui Zhang <samuelzhang1104@gmail.com> | |
Sun, 21 Jul 2013 22:31:07 +0000 (22:31 +0000) | ||
committer | Xiaohui Zhang <samuelzhang1104@gmail.com> | |
Sun, 21 Jul 2013 22:31:07 +0000 (22:31 +0000) |
index d93c6f46a81a4b6264546a973f67599182acac50..35d406ae099a03ddd3a8767ef01110837fab44cb 100644 (file)
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
000007 // FBANK
};
{
index 2dbd3ba57f5554e784dd596ea49681565fd90ccc..6911fa03770e14341d3b61b9f3d4c3c01293ddd8 100644 (file)
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
021406 // MFCC_D_A_0
};
{
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
021406 // MFCC_D_A_0
};
{
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
021406 // MFCC_D_A_0
};
{
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
021406 // MFCC_D_A_0
};
{
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
021406 // MFCC_D_A_0
};
{
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
021406 // MFCC_D_A_0
};
{
index cb6fcdd6bd7760ed0f18bc8a28535f26b816d570..8dcb31f3f36349120133ad23ae756ac05153ab53 100644 (file)
HtkHeader header = {
kaldi_features.NumRows(),
100000, // 10ms
- sizeof(float)*kaldi_features.NumCols(),
+ static_cast<int16>(sizeof(float)*kaldi_features.NumCols()),
021413 // PLP_D_A_0
};
{
index dbd7433d09cc669e7a8d26fee8eb3e1965c2c468..e2d9259e5c995091b2ec5cc1e1e53b9b2b2902df 100644 (file)
HtkHeader header = {
features.NumRows(),
100000, // 10ms shift
- sizeof(float)*features.NumCols(),
- 007 | // FBANK
- (fbank_opts.use_energy ? 0100 : 020000) // energy; otherwise c0
+ static_cast<int16>(sizeof(float)*features.NumCols()),
+ static_cast<uint16>(007 | // FBANK
+ (fbank_opts.use_energy ? 0100 : 020000)) // energy; otherwise c0
};
p.second = header;
htk_writer.Write(utt, p);
index e51ffc7487a0b234e35008b3c2e90022833cb82f..61730a01dd1813d7b0c964775180685d9e1e2024 100644 (file)
HtkHeader header = {
features.NumRows(),
100000, // 10ms shift
- sizeof(float)*features.NumCols(),
- 006 | // MFCC
- (mfcc_opts.use_energy ? 0100 : 020000) // energy; otherwise c0
+ static_cast<int16>(sizeof(float)*(features.NumCols())),
+ static_cast<uint16>( 006 | // MFCC
+ (mfcc_opts.use_energy ? 0100 : 020000)) // energy; otherwise c0
};
p.second = header;
htk_writer.Write(utt, p);
index f77e584e90b9e535e4648d0c22b24775db219962..eb0ef70a788915de1c457b415ef0bc6e6049c892 100644 (file)
HtkHeader header = {
features.NumRows(),
100000, // 10ms shift
- sizeof(float)*features.NumCols(),
+ static_cast<int16>(sizeof(float)*features.NumCols()),
013 | // PLP
020000 // C0 [no option currently to use energy in PLP.
};
index 4c54a021ca091ccec7832091b6e2b552f295098e..89edc44a61013da037ce32103e104e2a4c0f99c2 100644 (file)
HtkHeader header = {
features.NumRows(),
frame_shift,
- sizeof(float)*features.NumCols(),
+ static_cast<int16>(sizeof(float)*features.NumCols()),
007 | 020000
};
p.second = header;
index 2e766eba3dafbbd7dd117aff8579f9fb8a43f746..0e4889b68cc3fa85f24a3fff9288df0105070361 100644 (file)
}
float diff = 0.01;
- Weight w = RescaleToStochastic(fst, diff);
+ RescaleToStochastic(fst, diff);
Weight tot = ShortestDistance(*fst),
tot2 = ComputeTotalWeight(*fst, Weight(-log(2.0)));
std::cerr << " tot is " << tot<<", tot2 = "<<tot2<<'\n';
index 2340ee7e6fe487078adcee9ba941e46d496a0e9b..19c4e6038a4102586c52a2e50b694639e6d3dc65 100644 (file)
Elem *list = hash.GetList();
size_t count = 0;
for (; list != NULL; list = list->tail, count++) {
- assert(m1[list->key] == list->val);
+ KALDI_ASSERT(m1[list->key] == list->val);
}
for (size_t j = 0; j < 10; j++) {
Int key = rand() % 200;
bool found_m1 = (m1.find(key) != m1.end());
- T val_m1;
- if (found_m1) val_m1 = m1[key];
+ if (found_m1) m1[key];
Elem *e = hash.Find(key);
- assert( (e != NULL) == found_m1 );
+ KALDI_ASSERT( (e != NULL) == found_m1 );
if (found_m1)
- assert(m1[key] == e->val);
+ KALDI_ASSERT(m1[key] == e->val);
}
- assert(m1.size() == count);
+ KALDI_ASSERT(m1.size() == count);
}
}
index c7588ab7b7dfd63675a8dd81a61c9a04eebc7b99..e3bc66b79e1817f3b6a98e48dacde290d2a29a79 100644 (file)
std::vector<char*> vec;
int sz = rand() % 3;
bool is_null = false;
- for (int i = 0;i < sz;i++) { vec.push_back( (char*) (rand() % 2)); if (vec.back() == NULL) is_null = true; }
+ for (int i = 0;i < sz;i++) { vec.push_back( reinterpret_cast<char*>(static_cast<intptr_t>(rand() % 2))); if (vec.back() == NULL) is_null = true; }
assert(is_null == ContainsNullPointers(vec));
}
}