From a74183ddb4ab8383bfe214b3745eb8a0a99ee47a Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 25 Jun 2015 12:56:45 +0800 Subject: let HTK I/O implementation be a single package --- tnet_io/test.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 tnet_io/test.c (limited to 'tnet_io/test.c') diff --git a/tnet_io/test.c b/tnet_io/test.c deleted file mode 100644 index 6812ef1..0000000 --- a/tnet_io/test.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "cwrapper.h" -#include - -void print_nerv_matrix(Matrix *mat) { - int n = mat->nrow; - int m = mat->ncol; - int i, j; - size_t stride = mat->stride; - for (i = 0; i < n; i++) - { - - float *nerv_row = (float *)((char *)mat->data.f + i * stride); - for (j = 0; j < m; j++) - fprintf(stderr, "%.8f ", nerv_row[j]); - fprintf(stderr, "\n"); - } -} - -int main() { - fprintf(stderr, "init repo\n"); - TNetFeatureRepo *feat_repo = tnet_feature_repo_new( - "/slfs1/users/mfy43/swb_ivec/train_bp.scp", - "/slfs1/users/mfy43/swb_ivec/plp_0_d_a.conf", 5); - Matrix *feat_utter; - feat_utter = tnet_feature_repo_read_utterance(feat_repo, NULL, 1); - - TNetLabelRepo *lab_repo = tnet_label_repo_new( - "/slfs1/users/mfy43/swb_ivec/ref.mlf", - "map", - "/slfs1/users/mfy43/swb_ivec/dict", - "*/", - "lab"); - Matrix *lab_utter = tnet_label_repo_read_utterance(lab_repo, - feat_utter->nrow - 5 * 2, - tnet_feature_repo_current_samplerate(feat_repo), - tnet_feature_repo_current_tag(feat_repo), NULL, - 1); - print_nerv_matrix(lab_utter); - return 0; -} -- cgit v1.2.3-70-g09d2