Rst Cheatsheet ¶ The rst Cheatsheet covers a wide range of rst markup. It and its contents are CC licensed. Inline Markup ¶ Inline markup allows words and phrases within text to have character styles (like italics and boldface) and functionality (like hyperlinks). Sphinx cheatsheet ¶ A brief overview of some of the main functions of Sphinx as used in the aiida documentation. View This Page to see how this page was formatted. This is only a brief outline for more please see the Sphinx documentation. The Essential Sphinx Markup Cheatsheet for Faster Documentation. Carla Schroder. November 18, 2015. Last week, in Write Documentation Once, Output Multiple Formats with Sphinx we learned how to install the Sphinx documentation generator, and how to build HTML, PDF, Epub, and other documents from a new Sphinx installation. Cheat Sheet¶ If you are viewing the online version of this documentation, you can click here for our Security Onion Cheat Sheet. This was based on a cheat sheet originally created by Chris Sanders which can be found here.
Riddle Of The Sphinx Cheat Sheets Printable
Here is a quick and dirty cheat sheet for some common stuff you wantto do in sphinx and ReST. You can see the literal source for thissheet here This file. More basic documentation can be found at this resources:
Formatting text¶
You use inline markup to make text italics, bold, or monotype
.
You can represent code blocks fairly easily:
Or literally include code:
Making a list¶
It is easy to make lists in rest
Bullet points¶
This is a subsection making bullet points
- point A
- point B
- point C
Enumerated points¶
This is a subsection making numbered points
- point A
- point B
- point C
Making a table¶
This shows you how to make a table – if you only want to make a list see Making a list.
Name | Age |
---|---|
John D Hunter | 40 |
Cast of Thousands | 41 |
And Still More | 42 |
Making links¶
It is easy to make a link to yahoo or to somesection inside this document (see Making a table) or anotherdocument.
You can also reference classes, modules, functions, etc that aredocumented using the sphinx autodoc facilites. For example,see the module matplotlib.backend_bases
documentation, or theclass LocationEvent
, or the methodmpl_connect()
.
This file¶
Overview
Below are some commands that I’ve found particularly useful in working with CMU-Sphinx from the command line (i.e. Bash) on my Linux machine.
I hope they’re helpful to others, and if you have comments or suggestions for other commands to include, leave a comment! I’d like to get as much on here as possible, but still have it be more of a cheatsheet than a manual.
Acoustic Model Training
The following is the file structure you’re going to need to train an acoustic model from a set of transcribed sound files. This procedure relies on sphinxtrain which I show how to download in another post. Filenames matter! and in the file structure below, your_model should always be the same
File Structure:
So, that’s the overall file structure you need, and here’s what the contents of the files should include:
File contents
.fileids (paths to WAV files w/o extensions):
.transcription (transcription + file id w/o path or extension):
.wav (Recording files):
.dict (use alphanumeric-only, case-insensitive):
.phone (one phone per line + SIL for silence):
.lm (or .lm.bin, commonly in ARPA format):
.filler (filler noise dict):
Sphinx Cheat Sheet
Once you’ve got the structure correct and the appropriate contents for the files, the training command is actually very simple:
Below is an example of what my file structure looks like before training an acoustic model.
In my case, the main directory is located at ~/Desktop/kyrgyz. So everywhere above where you see your_model in the file and directory names, I just have kyrgyz.
Before training, we should just see two directories in the main dir:
Just looking into etc/ we see the following:
If you look into the wav/ dir, you will have any number of subdirs full of WAV files. Here I only have one subdir, audio-files:
Since this setup is correct, we can run the simple command to train the acoustic model:
If we look into the main dir again, we will see a lot got generated:
In my original kyrgyz/etc/ dir, some new files appear as well (feat.params and sphinx_train.cfg).
Riddle Of The Sphinx Cheat Sheets
If we look into sphinx_train.cfg, we see the following:
As you can see, it’s very important that you are consistent in your file and directory names, because they are dynamically generated at configuration based on the name you provide for your_model. In my case, you can see that the language model location is found by referencing the base/main directory as such: $DEC_CFG_LANGUAGEMODEL = “$CFG_BASE_DIR/etc/${CFG_DB_NAME}.lm.DMP”. So, if you are inconsistent, your configuration won’t be able to find your language model or other files.
You should take a look over sphinx_train.cfg to make sure everything is in its right place.
Once you’re sure you’re ready, you can do the actual training with:
Testing pocketsphinx
Test your system with a microphone:
Test your system (i.e. make predictions) on a bunch of WAV files:
Once you have run batch decoding on some files and generated a predictions.hyp file, do this command to see how good your hypotheses were: