forked from ShigekiKarita/espnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial.html
More file actions
366 lines (248 loc) · 14.8 KB
/
tutorial.html
File metadata and controls
366 lines (248 loc) · 14.8 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Outline — ESPnet 0.4.2 documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.4.2',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Speech Recognition (Recipe)" href="notebook/asr_cli.html" />
<link rel="prev" title="ESPnet: end-to-end speech processing toolkit" href="index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> ESPnet
</a>
<div class="version">
0.4.2
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Tutorial:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Outline</a></li>
<li class="toctree-l1"><a class="reference internal" href="#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="#execution-of-example-scripts">Execution of example scripts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#use-of-gpu">Use of GPU</a></li>
<li class="toctree-l2"><a class="reference internal" href="#setup-in-your-cluster">Setup in your cluster</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="#demonstration-using-pretrained-models">Demonstration using pretrained models</a></li>
<li class="toctree-l1"><a class="reference internal" href="#installation-using-docker">Installation using Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="#references">References</a></li>
</ul>
<p class="caption"><span class="caption-text">Notebook:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="notebook/asr_cli.html">Speech Recognition (Recipe)</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebook/asr_library.html">Speech Recognition (Library)</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebook/tts_cli.html">Text-to-Speech (Recipe)</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebook/pretrained.html">Pretrained Model</a></li>
</ul>
<p class="caption"><span class="caption-text">Package Reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="_gen/espnet-asr.html">espnet.asr package</a></li>
<li class="toctree-l1"><a class="reference internal" href="_gen/espnet-lm.html">espnet.lm package</a></li>
<li class="toctree-l1"><a class="reference internal" href="_gen/espnet-nets.html">espnet.nets package</a></li>
<li class="toctree-l1"><a class="reference internal" href="_gen/espnet-transform.html">espnet.transform package</a></li>
<li class="toctree-l1"><a class="reference internal" href="_gen/espnet-tts.html">espnet.tts package</a></li>
<li class="toctree-l1"><a class="reference internal" href="_gen/espnet-utils.html">espnet.utils package</a></li>
</ul>
<p class="caption"><span class="caption-text">Tool Reference:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="apis/espnet_bin.html">core tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="apis/utils_py.html">python utility tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="apis/utils_sh.html">bash utility tools</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">ESPnet</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Outline</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/tutorial.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<style>
/* CSS overrides for sphinx_rtd_theme */
/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
margin-bottom: 19px; /* padding has already 5px */
}
/* ... except between code cells! */
.nblast + .nbinput {
margin-top: -19px;
}
.admonition > p:before {
margin-right: 4px; /* make room for the exclamation icon */
}
/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
text-align: unset;
}
</style>
<div class="section" id="outline">
<h1>Outline<a class="headerlink" href="#outline" title="Permalink to this headline">¶</a></h1>
<p>ESPnet is an end-to-end speech processing toolkit.
ESPnet uses <a class="reference external" href="https://chainer.org/">chainer</a> as a main deep learning engine,
and also follows <a class="reference external" href="http://kaldi-asr.org/">Kaldi</a> style data processing, feature extraction/format, and recipes to provide a complete setup for speech recognition and other speech processing experiments.</p>
</div>
<div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<p>Install Kaldi, Python libraries and other required tools</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> tools
$ make -j
</pre></div>
</div>
<p>To use cuda (and cudnn), make sure to set paths in your <code class="docutils literal notranslate"><span class="pre">.bashrc</span></code> or <code class="docutils literal notranslate"><span class="pre">.bash_profile</span></code> appropriately.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>CUDAROOT=/path/to/cuda
export PATH=$CUDAROOT/bin:$PATH
export LD_LIBRARY_PATH=$CUDAROOT/lib64:$LD_LIBRARY_PATH
export CUDA_HOME=$CUDAROOT
export CUDA_PATH=$CUDAROOT
</pre></div>
</div>
</div>
<div class="section" id="execution-of-example-scripts">
<h1>Execution of example scripts<a class="headerlink" href="#execution-of-example-scripts" title="Permalink to this headline">¶</a></h1>
<p>Move to an example directory under the <code class="docutils literal notranslate"><span class="pre">egs</span></code> directory.
We prepare several major ASR benchmarks including WSJ, CHiME-4, and TED.
The following directory is an example of performing ASR experiment with the VoxForge Italian Corpus.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> egs/voxforge/asr1
</pre></div>
</div>
<p>Once move to the directory, then, execute the following main script:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ ./run.sh
</pre></div>
</div>
<p>With this main script, you can perform a full procedure of ASR experiments including</p>
<ul class="simple">
<li>Data download</li>
<li>Data preparation (Kaldi style, see http://kaldi-asr.org/doc/data_prep.html)</li>
<li>Feature extraction (Kaldi style, see http://kaldi-asr.org/doc/feat.html)</li>
<li>Dictionary and JSON format data preparation</li>
<li>Training based on <a class="reference external" href="https://chainer.org/">chainer</a>.</li>
<li>Recognition and scoring</li>
</ul>
<div class="section" id="use-of-gpu">
<h2>Use of GPU<a class="headerlink" href="#use-of-gpu" title="Permalink to this headline">¶</a></h2>
<p>If you use GPU in your experiment, set <code class="docutils literal notranslate"><span class="pre">--gpu</span></code> option in <code class="docutils literal notranslate"><span class="pre">run.sh</span></code> appropriately, e.g.,</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ ./run.sh --gpu <span class="m">0</span>
</pre></div>
</div>
<p>Default setup uses CPU (<code class="docutils literal notranslate"><span class="pre">--gpu</span> <span class="pre">-1</span></code>).</p>
</div>
<div class="section" id="setup-in-your-cluster">
<h2>Setup in your cluster<a class="headerlink" href="#setup-in-your-cluster" title="Permalink to this headline">¶</a></h2>
<p>Change <code class="docutils literal notranslate"><span class="pre">cmd.sh</span></code> according to your cluster setup.
If you run experiments with your local machine, you don’t have to change it.
For more information about <code class="docutils literal notranslate"><span class="pre">cmd.sh</span></code> see http://kaldi-asr.org/doc/queue.html.
It supports Grid Engine (<code class="docutils literal notranslate"><span class="pre">queue.pl</span></code>), SLURM (<code class="docutils literal notranslate"><span class="pre">slurm.pl</span></code>), etc.</p>
</div>
</div>
<div class="section" id="demonstration-using-pretrained-models">
<h1>Demonstration using pretrained models<a class="headerlink" href="#demonstration-using-pretrained-models" title="Permalink to this headline">¶</a></h1>
<p>ESPnet provides some pretrained models.
You can easily perform speech recognition using them through a demo script. For example,</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> egs/tedlium/asr1
../../../utils/recog_wav.sh --models tedlium.demo foo.wav
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">foo.wav</span></code> is a WAV file that contains speech to be recognized and <code class="docutils literal notranslate"><span class="pre">tedlium.demo</span></code> is a model name.</p>
<p>You can also perform speech synthesis as follows:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> egs/libritts/tts1
../../../utils/synth_wav.sh --models libritts.v1 --input_wav bar.wav foo.txt
</pre></div>
</div>
<p>where <code class="docutils literal notranslate"><span class="pre">foo.txt</span></code> is a TXT file that contains text to be synthesized and <code class="docutils literal notranslate"><span class="pre">bar.wav</span></code> is a WAV file for controlling meta information such as speaker characteristics of synthesized speech.
The name list of available pretrained models will be summarized.</p>
</div>
<div class="section" id="installation-using-docker">
<h1>Installation using Docker<a class="headerlink" href="#installation-using-docker" title="Permalink to this headline">¶</a></h1>
<p>For GPU support nvidia-docker should be installed.</p>
<p>For Execution use the command</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> egs/voxforge/asr1
$ ./run_in_docker.sh --gpu GPUID
</pre></div>
</div>
<p>If GPUID is set to -1, the program will run only CPU.</p>
<p>The file builds and loads the information into the Docker container. If any additional application is required, modify the Docker devel-file located at the tools folder.</p>
<p>To downgrade or use a private devel file, modify the name inside run_in_docker.sh</p>
</div>
<div class="section" id="references">
<h1>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h1>
<p>Please cite the following articles.</p>
<ol class="simple">
<li>Suyoun Kim, Takaaki Hori, and Shinji Watanabe, “Joint CTC-attention based end-to-end speech recognition using multi-task learning,” <em>Proc. ICASSP’17</em>, pp. 4835–4839 (2017)</li>
<li>Shinji Watanabe, Takaaki Hori, Suyoun Kim, John R. Hershey and Tomoki Hayashi, “Hybrid CTC/Attention Architecture for End-to-End Speech Recognition,” <em>IEEE Journal of Selected Topics in Signal Processing</em>, vol. 11, no. 8, pp. 1240-1253, Dec. 2017</li>
</ol>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="notebook/asr_cli.html" class="btn btn-neutral float-right" title="Speech Recognition (Recipe)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="index.html" class="btn btn-neutral float-left" title="ESPnet: end-to-end speech processing toolkit" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2017, Shinji Watanabe
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>