summaryrefslogtreecommitdiff
path: root/htk_io/src/cwrapper.h
blob: 44e77cf53e928c47b8f105b60b2ca347d20dc1ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef NERV_TNET_IO_CWRAPPER
#define NERV_TNET_IO_CWRAPPER
#include "nerv/matrix/matrix.h"
#include "nerv/common.h"
#ifdef __cplusplus
extern "C" {
#endif

    typedef struct TNetFeatureRepo TNetFeatureRepo;

    TNetFeatureRepo *tnet_feature_repo_new(const char *scp,
                                            const char *config, int context);
    Matrix *tnet_feature_repo_read_utterance(TNetFeatureRepo *repo, lua_State *L, int debug);
    size_t tnet_feature_repo_current_samplerate(TNetFeatureRepo *repo);
    const char *tnet_feature_repo_current_tag(TNetFeatureRepo *repo);
    void tnet_feature_repo_next(TNetFeatureRepo *repo);
    int tnet_feature_repo_is_end(TNetFeatureRepo *repo);
    void tnet_feature_repo_destroy(TNetFeatureRepo *repo);
    TNetFeatureRepo *tnet_feature_repo_newWithId(long id); 
    long tnet_feature_repo_id(TNetFeatureRepo *repo);



    typedef struct TNetLabelRepo TNetLabelRepo;

    TNetLabelRepo *tnet_label_repo_new(const char *mlf, const char *fmt,
                                        const char *fmt_arg, const char *dir,
                                        const char *ext);

    Matrix *tnet_label_repo_read_utterance(TNetLabelRepo *repo,
                                            size_t frames,
                                            size_t sample_rate,
                                            const char *tag,
                                            lua_State *L,
                                            int debug);

    void tnet_label_repo_destroy(TNetLabelRepo *repo);

    TNetLabelRepo *tnet_label_repo_newWithId(long id); 

    long tnet_label_repo_id(TNetLabelRepo *repo);

#ifdef __cplusplus
}
#endif
#endif