Permalink
Browse files

experiment (and others) - fairly large refactoring of experiments (an…

…d no longer have default paths for dataDir, etc in code)

Ignore-this: 5d114c25fd06010fcd433ab28caba0b9

darcs-hash:20121011180456-3a4db-ed2dfda62a06b7cbc01a029acdc19c7c1b402587
  • Loading branch information...
1 parent af51826 commit ef0369fc4a0f055760d7e6897864424fa84cef3d @MattShannon committed Oct 11, 2012
Showing with 218 additions and 131 deletions.
  1. +10 −3 README.markdown
  2. +4 −3 expt_hts_demo/corpus_arctic.py
  3. +168 −118 expt_hts_demo/experiment.py
  4. +1 −7 expt_hts_demo/experiment_runner.py
  5. +35 −0 expt_hts_demo/mgc_lf0_bap.py
View
@@ -41,9 +41,16 @@ armspeech has the following dependencies:
To set-up this directory:
-- add appropriate directories or symlinks for `expt_hts_demo/data/mgc`,
- `expt_hts_demo/data/lf0`, `expt_hts_demo/data/bap` and
- `expt_hts_demo/data/labels/full` (e.g. copied from the HTS demo)
+- add paths to an appropriate data directory and label directory in
+ `expt_hts_demo/experiment.py` (by editing the strings starting '## TBA').
+ The data directory should contain `.mgc`, `.lf0` and `.bap` files.
+ The label directory should contain `.lab` files, each of which is an
+ alignment with full-context labels.
+ Either phone-level or state-level alignments may be used (but note that some
+ of the example experiments require state-level alignments).
+- update `mgcOrder` (two places) and `subLabels` (one place) in
+ `expt_hts_demo/experiment.py` (where the corpus objects are created) to have
+ values appropriate for your corpus.
- if you want to generate audio, add an appropriate `scripts/Config.pm` file
(e.g. copied from the HTS demo)
- if necessary make `print_pickle.py`, `run_expt_hts_demo.sh` and `run_tests.sh`
@@ -43,10 +43,11 @@ def __init__(self, trainUttIds, testUttIds, synthUttIds, dataDir, labDir, script
if self.subLabels is not None:
self.subLabelSet = frozenset(self.subLabels)
+ self.bapOrder = 5
lf0Encoder = feat.Msd01Encoder(specialValue = -1e10)
- mgcStream = feat.Stream('mgc', mgcOrder)
+ mgcStream = feat.Stream('mgc', self.mgcOrder)
lf0Stream = feat.Stream('lf0', 1, lf0Encoder)
- bapStream = feat.Stream('bap', 5)
+ bapStream = feat.Stream('bap', self.bapOrder)
self.streams = [mgcStream, lf0Stream, bapStream]
self.mgcLims = getMgcLims40()
@@ -76,7 +77,7 @@ def rawAlignment(self, uttId):
def rawAcousticSeq(self, uttId):
return list(feat.readAcousticGen(
self.streams,
- lambda stream: os.path.join(self.dataDir, stream.name, uttId+'.'+stream.name)
+ lambda stream: os.path.join(self.dataDir, uttId+'.'+stream.name)
))
def data(self, uttId):
Oops, something went wrong. Retry.

0 comments on commit ef0369f

Please sign in to comment.