~didrocks/+junk/sensorydemo

« back to all changes in this revision

Viewing changes to shared/datalocations.h

  • Committer: Didier Roche
  • Date: 2016-04-21 08:17:28 UTC
  • Revision ID: didier.roche@canonical.com-20160421081728-qwph04mwkbbwnfg1
Add files for sensory test

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Sensory Confidential
 
3
 *
 
4
 * Copyright (C)2000-2015 Sensory Inc.
 
5
 *
 
6
 * -----------------------------------------------------------------
 
7
 * Sensory TrulyHandsfree SDK: datalocations.h
 
8
 * Defines where data files are located on various platforms
 
9
 *-----------------------------------------------------------------
 
10
 */
 
11
 
 
12
#ifndef DATALOCATIONS_H
 
13
#define DATALOCATIONS_H
 
14
 
 
15
#if defined(__cplusplus) 
 
16
extern "C" {
 
17
#endif
 
18
 
 
19
/* Evaluate and stringify macro */
 
20
#define __STR(a) #a
 
21
#define _STR(a) __STR(a)
 
22
 
 
23
/* Avoid unwanted substitutions in DATADIR_SAMP and DATADIR paths */
 
24
#ifdef linux
 
25
# undef linux
 
26
# define linux linux
 
27
#endif
 
28
#ifdef x86_64
 
29
# undef x86_64
 
30
# define x86_64 x86_64
 
31
#endif
 
32
 
 
33
#ifndef DATADIR_SAMP
 
34
# define DATADIR_SAMP ../Data
 
35
#endif
 
36
 
 
37
#ifndef DATADIR
 
38
# define DATADIR DATADIR_SAMP/../../../Data
 
39
#endif
 
40
 
 
41
#if 1
 
42
/*------------ 16kHz large vocabulary language data ----------*/
 
43
# define LVCSR_LANGDIR en_us_16kHz_v11
 
44
# define NETFILE_LVCSR_3_500 "nn_en_us_fbank_16k_3_500_v12.0.0.raw"
 
45
# define LTSFILE_LVCSR_3_500 "lts_en_us_12.1.4.raw"
 
46
#endif
 
47
 
 
48
#if 0
 
49
/*------------ 8kHz language data ----------*/
 
50
/* US ENGLISH */
 
51
# define LANGDIR    en_us_8kHz_v8
 
52
# define NETROOT    nn_en_us_mfcc_8k_15_big_250_v4.7
 
53
# define LTSROOT    lts_en_us_9.3
 
54
#endif
 
55
 
 
56
#if 1
 
57
/*------------ 16kHz language data ----------*/
 
58
/* US ENGLISH */
 
59
# define LANGDIR   en_us_16kHz_v10
 
60
# define TTSDIR    tts_en_us_16kHz_v1
 
61
# define NETROOT   nn_en_us_mfcc_16k_15_250_v5.1.1
 
62
# define LTSROOT   lts_en_us_9.5.2b
 
63
# define VOICEROOT tts_en_us_cid_sally_v1.0
 
64
# define SVSID_AND_UDT_ROOT svsid_and_udt_1_1
 
65
# define SVSID_ROOT         svsid_1_1
 
66
# define UDT_ROOT           udt_1_1
 
67
# define PHNSEARCH_ROOT     phonemeSearch_1_5
 
68
#endif
 
69
 
 
70
#if 0
 
71
/* SPANISH */
 
72
# define LANGDIR    es_16kHz_v8
 
73
# define NETROOT    nn_es_mfcc_16k_15_big_250_v1.1
 
74
# define LTSROOT    lts_es_3.14
 
75
#endif
 
76
 
 
77
#if 0
 
78
/* UK ENGLISH */
 
79
# define LANGDIR    en_uk_16kHz_v8
 
80
# define NETROOT    nn_en_uk_mfcc_16k_15_big_250_v2.0
 
81
# define LTSROOT    lts_en_2.8.1
 
82
#endif
 
83
 
 
84
#if 0
 
85
/* GERMAN */
 
86
# define LANGDIR    de_16kHz_v8
 
87
# define NETROOT    nn_de_mfcc_16k_15_big_250_v3.0
 
88
# define LTSROOT    lts_de_3.3.5
 
89
#endif
 
90
 
 
91
#if 0
 
92
/* FRENCH */
 
93
# define LANGDIR    fr_16kHz_v8
 
94
# define NETROOT    nn_fr_mfcc_16k_15_big_250_v2.2
 
95
# define LTSROOT    lts_fr_3.12.1
 
96
#endif
 
97
 
 
98
#if 0
 
99
/* ITALIAN */
 
100
# define LANGDIR    it_16kHz_v8
 
101
# define NETROOT    nn_it_mfcc_16k_15_big_250_v3.2
 
102
# define LTSROOT    lts_it_1.6
 
103
#endif
 
104
 
 
105
#if 0
 
106
/* MANDARIN */
 
107
# define LANGDIR    zh_16kHz_v8
 
108
# define NETROOT    nn_zh_mfcc_16k_15_big_250_v2.1
 
109
# define LTSROOT    lts_zh_3.2.4
 
110
#endif
 
111
 
 
112
#if 0
 
113
/* JAPANESE */
 
114
# define LANGDIR    ja_16kHz_v8
 
115
# define NETROOT    nn_ja_mfcc_16k_15_big_250_v4.2
 
116
# define LTSROOT    lts_ja_5.17
 
117
#endif
 
118
 
 
119
#if 0
 
120
/* KOREAN */
 
121
#define LANGDIR    ko_16kHz_v8
 
122
#define NETROOT    nn_ko_mfcc_16k_15_big_250_v2.0
 
123
#define LTSROOT    lts_ko_1.0
 
124
#endif
 
125
 
 
126
/* -------------COMMON ---------------------------------- */
 
127
#define NETFILE    _STR(NETROOT) ".raw" /* Acoustic model */
 
128
#define LTSFILE    _STR(LTSROOT) ".raw" /* Pronunciation model */
 
129
#define VOICEFILE  _STR(VOICEROOT) ".raw" /* TTS Voice model */
 
130
#define SVSID_AND_UDT_FILE _STR(SVSID_AND_UDT_ROOT) ".raw"
 
131
#define SVSID_FILE         _STR(SVSID_ROOT) ".raw"
 
132
#define UDT_FILE           _STR(UDT_ROOT) ".raw"
 
133
#define PHNSEARCH_FILE     _STR(PHNSEARCH_ROOT) ".raw"
 
134
 
 
135
 
 
136
#define THF_DATADIR     _STR(DATADIR) "/" _STR(LANGDIR) "/"
 
137
#define THF_TTSDIR      _STR(DATADIR) "/" _STR(TTSDIR)  "/"
 
138
#define SAMPLES_DATADIR _STR(DATADIR_SAMP) "/"
 
139
 
 
140
#define THF_LVCSR_DATADIR _STR(DATADIR) "/" _STR(LVCSR_LANGDIR) "/"
 
141
 
 
142
#define STATIC_DEF(_a_,_b_) <DATADIR/_a_/_b_.c>
 
143
#define STATIC_NETFILE            STATIC_DEF(LANGDIR,NETROOT)
 
144
#define STATIC_LTSFILE            STATIC_DEF(LANGDIR,LTSROOT)
 
145
#define STATIC_VOICEFILE          STATIC_DEF(TTSDIR,VOICEROOT)
 
146
#define STATIC_SVSID_AND_UDT_FILE STATIC_DEF(LANGDIR,SVSID_AND_UDT_ROOT)
 
147
#define STATIC_SVSID_FILE         STATIC_DEF(LANGDIR,SVSID_ROOT)
 
148
#define STATIC_UDT_FILE           STATIC_DEF(LANGDIR,UDT_ROOT)
 
149
#define STATIC_PHNSEARCH_FILE     STATIC_DEF(LANGDIR,PHNSEARCH_ROOT)
 
150
 
 
151
#if defined(__cplusplus) 
 
152
}
 
153
#endif
 
154
#endif