<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Michael McAuliffe</title><link href="https://memcauliffe.com/" rel="alternate"></link><link href="https://memcauliffe.com/feeds/all.atom.xml" rel="self"></link><id>https://memcauliffe.com/</id><updated>2023-01-14T00:00:00-08:00</updated><subtitle>Sometimes my tinkerings are useful</subtitle><entry><title>Dear Diarization: Using MFA 2.1 to assign speaker labels to utterances</title><link href="https://memcauliffe.com/dear-diarization-using-mfa-21-to-assign-speaker-labels-to-utterances.html" rel="alternate"></link><published>2023-01-14T00:00:00-08:00</published><updated>2023-01-14T00:00:00-08:00</updated><author><name>mmcauliffe</name></author><id>tag:memcauliffe.com,2023-01-14:/dear-diarization-using-mfa-21-to-assign-speaker-labels-to-utterances.html</id><summary type="html">&lt;p&gt;
 Evaluating speaker diarization in MFA for English and Korean
&lt;/p&gt;</summary><content type="html">&lt;p&gt;
 Some sort of intro
&lt;/p&gt;



&lt;div class="admonition seealso"&gt;
 &lt;p class="admonition-title"&gt;
  See also
 &lt;/p&gt;
 &lt;p&gt;
  Hello!
 &lt;/p&gt;
&lt;/div&gt;



&lt;section id="methods"&gt;
 &lt;h1&gt;
  Methods
  &lt;a class="headerlink" href="#methods" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;section id="data"&gt;
  &lt;h2&gt;
   Data
   &lt;a class="headerlink" href="#data" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;section id="english-buckeye-corpus"&gt;
   &lt;h3&gt;
    English - Buckeye corpus
    &lt;a class="headerlink" href="#english-buckeye-corpus" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
  &lt;/section&gt;
  &lt;section id="korean-seoul-corpus"&gt;
   &lt;h3&gt;
    Korean - Seoul corpus
    &lt;a class="headerlink" href="#korean-seoul-corpus" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
  &lt;/section&gt;
 &lt;/section&gt;
&lt;/section&gt;</content><category term="Blog"></category><category term="mfa"></category><category term="benchmarks"></category><category term="speaker diarization"></category></entry><entry><title>Playing around with PolyglotDB</title><link href="https://memcauliffe.com/playing-around-with-polyglotdb.html" rel="alternate"></link><published>2021-08-29T00:00:00-07:00</published><updated>2021-08-29T00:00:00-07:00</updated><author><name>mmcauliffe</name></author><id>tag:memcauliffe.com,2021-08-29:/playing-around-with-polyglotdb.html</id><summary type="html">&lt;p&gt;
 Following some updates to PolyglotDB, let’s play around with some recordings and extract some acoustic measures
&lt;/p&gt;</summary><content type="html">&lt;p&gt;
 [TOC]
&lt;/p&gt;



&lt;section id="overview"&gt;
 &lt;h1&gt;
  Overview
  &lt;a class="headerlink" href="#overview" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  The past few
  &lt;a class="reference external" href="%7Bcategory%7D/Blog"&gt;
   blog posts
  &lt;/a&gt;
  have focused on some of the updates I’ve done recently to the
  &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/"&gt;
   Montreal Forced Aligner
  &lt;/a&gt;
  , a tool I made while doing a postdoc at McGill with
  &lt;a class="reference external" href="http://people.linguistics.mcgill.ca/~morgan/"&gt;
   Morgan Sonderegger
  &lt;/a&gt;
  and
  &lt;a class="reference external" href="https://prosodylab.org/"&gt;
   Michael Wagner
  &lt;/a&gt;
  .  The other primary tool is
  &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/PolyglotDB"&gt;
   PolyglotDB
  &lt;/a&gt;
  (and the web interface
  &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/iscan-spade-server"&gt;
   ISCAN
  &lt;/a&gt;
  ), a tool for analyzing forced-aligned corpora and extracting automated measures, particularly of large corpora.  I’ve recently gotten it working with the latest versions of its backend databases,
  &lt;a class="reference external" href="https://neo4j.com/release-notes/database/neo4j-4-3-3/"&gt;
   Neo4j
  &lt;/a&gt;
  and
  &lt;a class="reference external" href="https://docs.influxdata.com/influxdb/v1.8/"&gt;
   InfluxDB
  &lt;/a&gt;
  , and thought it might be neat to do some super basic demonstrations.  I also have a collection of headsets and microphones now, and so what I’ve done this time is record a couple of different passages with the different microphones to see if their quality affects some acoustic measurements.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="dataset"&gt;
 &lt;h1&gt;
  Dataset
  &lt;a class="headerlink" href="#dataset" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  The text materials come from two sources.  The first is
  &lt;a class="reference external" href="https://en.wikipedia.org/wiki/The_North_Wind_and_the_Sun"&gt;
   the North Wind and the Sun Aesop fable
  &lt;/a&gt;
  that has been used in some phonetic research (I remember
  &lt;a class="reference external" href="https://linguistics.ubc.ca/profile/molly-babel/"&gt;
   Molly Babel
  &lt;/a&gt;
  and Phoebe Wong doing a project that used it), and the second is a reading passage from
  &lt;a class="reference external" href="https://www.researchgate.net/publication/31124675_Patterns_of_uw_and_ow_fronting_in_Reno_Nevada"&gt;
   Fridland and Macrae (2008)
  &lt;/a&gt;
  .
 &lt;/p&gt;
 &lt;p&gt;
  The microphone setups that I have are:
 &lt;/p&gt;
 &lt;ul class="simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://www.bose.com/en_us/products/headphones/over_ear_headphones/quietcomfort-35-wireless-ii.html"&gt;
     Bose QC35 II
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://www.hyperxgaming.com/unitedstates/us/headsets/cloud-gaming-headset"&gt;
     HyperX Cloud 2 wired headset
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://www.hyperxgaming.com/unitedstates/us/headsets/cloud-gaming-headset"&gt;
     Hyper X Cloud 2 wireless headset
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://www.hp.com/us-en/shop/cat/laptops"&gt;
     HP laptop microphone
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://www.acer.com/ac/en/US/content/predator-series/predatortriton300"&gt;
     Acer Predator Triton 300 gaming laptop microphone
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://www.oneplus.com/6"&gt;
     OnePlus 6 smartphone microphone
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
 &lt;/ul&gt;
 &lt;p&gt;
  With each of those I record both passages each in two recording conditions, one where there’s no background noise (though I live on the second floor, so there’s likely some traffic noise), and one with my AC on in the background.  For the recording set up, I just used the Windows voice recorder app, or the stock Android voice recorder on my phone.  So that’s 24 recordings all told (6 microphones, 2 stories, 2 noise conditions).  The North Wind recordings are around 35 seconds, and the Fridland passage ones are around a minute and a half. If there was a major speech error, I would start over (mostly because I would accidentally add additional swear words), but minor speech errors or restarts were kept.
 &lt;/p&gt;
 &lt;p&gt;
  The recordings were forced aligned with MFA using the
  &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/mfa-models/blob/main/acoustic/english_ipa.zip"&gt;
   english_ipa acoustic model
  &lt;/a&gt;
  and
  &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/mfa-models/blob/main/dictionary/english_us_ipa.dict"&gt;
   corresponding dictionary
  &lt;/a&gt;
  . I didn’t touch the transcript or add words for any errors or restarts.  I did some very basic spot-checking, and the TextGrids looked good enough to me.  Anecdotally, the microphone in the Bose headset is the worst, as its primary purpose is as noise-cancelling headphones and not as a quality headset, and a number of friends have reacted negatively to its quality compared to the HyperX headsets.  HyperX headsets tend to be on the quieter side for the microphone, so I have some
  &lt;a class="reference external" href="https://sourceforge.net/projects/peace-equalizer-apo-extension/"&gt;
   preamp software
  &lt;/a&gt;
  set up to boost the gain.
 &lt;/p&gt;
 &lt;p&gt;
  You can download the sound files and transcriptions
  &lt;a class="reference external" href="https://drive.google.com/file/d/1ye50TnIqJ0j673AKV6ykFWuKK1Hiqu4Z/view?usp=sharing"&gt;
   here
  &lt;/a&gt;
  if you want to play around with them.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="analysis"&gt;
 &lt;h1&gt;
  Analysis
  &lt;a class="headerlink" href="#analysis" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  The scripts I’m using are based on the
  &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/SPADE"&gt;
   SPADE scripts
  &lt;/a&gt;
  for analyzing dialects of English.  I’m going to talk about vowel measures, a bit of sibilant measures, and pitch tracking measures.
 &lt;/p&gt;
 &lt;section id="vowel-space"&gt;
  &lt;h2&gt;
   Vowel space
   &lt;a class="headerlink" href="#vowel-space" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The vowel formant measurement script uses the
   &lt;a class="reference external" href="https://polyglotdb.readthedocs.io/en/latest/acoustics_encoding.html#refined-formant-points-and-tracks"&gt;
    refinement algorithm
   &lt;/a&gt;
   based on
   &lt;a class="reference external" href="https://github.com/JoFrhwld/FAVE/tree/master/FAVE-extract"&gt;
    FAVE-extract
   &lt;/a&gt;
   and modified by
   &lt;a class="reference external" href="https://chass.ncsu.edu/people/jimielke/"&gt;
    Jeff Mielke
   &lt;/a&gt;
   during the
   &lt;a class="reference external" href="https://spade.glasgow.ac.uk/"&gt;
    SPADE project
   &lt;/a&gt;
   . The basic idea is that you get some distributional information about the vowel categories overall, and use these to make more informed selection of formant track candidates on a per-token basis, minimizing distance to the vowel prototypes.  These prototypes don’t have to be generated on the fly, and there are a number available in the
   &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/SPADE"&gt;
    SPADE repository
   &lt;/a&gt;
   .  For the initial analysis, I’m working with 4 versions of the algorithm:
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;code class="docutils literal notranslate"&gt;
      &lt;span class="pre"&gt;
       base
      &lt;/span&gt;
     &lt;/code&gt;
     : generate prototypes on a first pass and use them to generate the final measures
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;code class="docutils literal notranslate"&gt;
      &lt;span class="pre"&gt;
       spade-Buckeye
      &lt;/span&gt;
     &lt;/code&gt;
     : Use prototypes from the
     &lt;a class="reference external" href="https://buckeyecorpus.osu.edu/"&gt;
      Buckeye Corpus
     &lt;/a&gt;
     (relabelling the Buckeye phoneset into IPA)
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;code class="docutils literal notranslate"&gt;
      &lt;span class="pre"&gt;
       spade-SantaBarbara
      &lt;/span&gt;
     &lt;/code&gt;
     : Use prototypes from the
     &lt;a class="reference external" href="https://www.linguistics.ucsb.edu/research/santa-barbara-corpus"&gt;
      Santa Barbara corpus
     &lt;/a&gt;
     (relabelling the phoneset into IPA)
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;code class="docutils literal notranslate"&gt;
      &lt;span class="pre"&gt;
       spade-SOTC
      &lt;/span&gt;
     &lt;/code&gt;
     : Use prototypes from the
     &lt;a class="reference external" href="https://ctpp.vectorgraphicdesigner.co.uk/"&gt;
      Sounds of the City corpus
     &lt;/a&gt;
     (relabelling the phoneset into IPA)
    &lt;/p&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   The reason behind these selections is the range of dialectal similarity to my own.  My dialect is Western American, early years split between Boulder, Colorado and Seattle, Washington, grad school in Vancouver, BC, and postdoc in Montreal, QC.  So my dialect is West Coast, with some Canadian exemplars sprinkled in.  Of the three external sources above, the Santa Barbara corpus should be the closest to my dialect (though not exactly, since California has its own peculiarities), with Buckeye as a little less similar, but still American English dialect.  Sounds of the City corpus is made of Glaswegian speakers, so their dialect should be quite different from mine.
  &lt;/p&gt;
  &lt;p&gt;
   My initial pass for generating the formants had each microphone treated as an individual speaker, as shown below.  This disadvantages the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     base
    &lt;/span&gt;
   &lt;/code&gt;
   condition the most, because the number of examples to form mean and standard deviation estimates is much lower.  Particularly, it struggles with
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /u/
    &lt;/span&gt;
   &lt;/code&gt;
   tokens in the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     bose
    &lt;/span&gt;
   &lt;/code&gt;
   headset, primarily due to consistent issues in first formant tracking.  Note as well, that
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     spade-SOTC
    &lt;/span&gt;
   &lt;/code&gt;
   struggles with the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /ʊ/
    &lt;/span&gt;
   &lt;/code&gt;
   tokens, often having them very fronted.  The two American dialect sources show pretty good clustering.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/vowel_spaces.svg"&gt;
    &lt;img alt="Vowel spaces generated using per-microphone speakers in refinement" src="https://memcauliffe.com/images/polyglot_test/vowel_spaces.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Vowel spaces generated using per-microphone speakers in refinement
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   As a more fair comparison, I grouped all the microphones together and re-ran the analysis.  They are all recorded by me, after all!  The plot below shows much better performance for the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     base
    &lt;/span&gt;
   &lt;/code&gt;
   condition.  Across the board, the phones cluster more tightly in these cases, since all the conditions benefit from having more data to create better per-speaker distributions following the initial fitting based on the prototypes.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/vowel_spaces_single_speaker.svg"&gt;
    &lt;img alt="Vowel spaces generated using a single speaker in refinement" src="https://memcauliffe.com/images/polyglot_test/vowel_spaces_single_speaker.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Vowel spaces generated using a single speaker in refinement
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   Astute readers (looking at you, Kaylynn!) might have noticed that there are
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /ɔ/
    &lt;/span&gt;
   &lt;/code&gt;
   vowels distinct from
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /ɑ/
    &lt;/span&gt;
   &lt;/code&gt;
   , which doesn’t make sense since my dialect is a merged one.  In general, these
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /ɔ/
    &lt;/span&gt;
   &lt;/code&gt;
   vowels are from
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     NORTH
    &lt;/span&gt;
   &lt;/code&gt;
   and
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     FORCE
    &lt;/span&gt;
   &lt;/code&gt;
   words, where the distinction remains.  MFA did select the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /ɔ/
    &lt;/span&gt;
   &lt;/code&gt;
   pronunciation variant for some words that would be merged, and you can see those words in the plot below mixed in with the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /ɑ/
    &lt;/span&gt;
   &lt;/code&gt;
   words.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/vowel_spaces_single_speaker_example_words.svg"&gt;
    &lt;img alt="Distribution of individual tokens with their word label from the no noise recording condition for both passages on the HyperX Cloud 2 wired headset" src="https://memcauliffe.com/images/polyglot_test/vowel_spaces_single_speaker_example_words.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Distribution of individual tokens with their word label from the "no noise" recording condition for both passages on the HyperX Cloud 2 wired headset
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   So generally speaking, formant tracking is not too bad here, and this is with a relatively low count of tokens (about 400-450 total vowel tokens per microphone setup).  Even using completely different dialect prototypes to seed the initial formant estimation lets it recover somewhat from very sparse data.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="sibilants"&gt;
  &lt;h2&gt;
   Sibilants
   &lt;a class="headerlink" href="#sibilants" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   In addition to the vowel scripts from SPADE, I also ran the sibilant analysis.  Somewhat surprisingly, the various microphones did pretty well on center of gravity, except for the Predator laptop that has the measure for
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /ʃ/
    &lt;/span&gt;
   &lt;/code&gt;
   approaching that of
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /s/
    &lt;/span&gt;
   &lt;/code&gt;
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/sibilants.svg"&gt;
    &lt;img alt="Sibilant center of gravity estimation across recording setups" src="https://memcauliffe.com/images/polyglot_test/sibilants.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Sibilant center of gravity estimation across recording setups
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   I was tempted to look into more sophisticated measures, like multitaper spectral analysis, for analyzing the sibilants, but it’s a bit outside the scope for the current post.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="pitch"&gt;
  &lt;h2&gt;
   Pitch
   &lt;a class="headerlink" href="#pitch" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The pitch measures here aren’t in SPADE, but they come from some work on intonational contours with Michael Wagner.  The set up for this section uses the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     speaker
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     adjusted
    &lt;/span&gt;
   &lt;/code&gt;
   pitch algorithm with two sources,
   &lt;a class="reference external" href="https://www.fon.hum.uva.nl/praat/manual/Sound__To_Pitch___.html"&gt;
    Praat
   &lt;/a&gt;
   and
   &lt;a class="reference external" href="https://github.com/google/REAPER"&gt;
    Reaper
   &lt;/a&gt;
   .  The
   &lt;a class="reference external" href="https://polyglotdb.readthedocs.io/en/latest/acoustics_encoding.html#encoding-pitch"&gt;
    speaker adjustment algorithm
   &lt;/a&gt;
   is similar to the refined formants above, where we do an initial pass to estimate a good pitch range for a speaker using a baseline pitch range that will likely have some errors, and then generate the actual pitch tracks with the better pitch range.  See
   &lt;a class="reference external" href="#appendix"&gt;
    the appendix
   &lt;/a&gt;
   for a more detailed look at the performance gains that speaker adaptation brings.  As with the formant refinement algorithm above, the speaker adaptation benefits from larger amounts of data on the same speaker, so all the pitch analyses use the single speaker set up.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single.svg"&gt;
    &lt;img alt="Pitch tracks across the recordings of the North Wind and the Sun" src="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Pitch tracks across the recordings of the North Wind and the Sun passage
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   In general, pitch measurements from Reaper are more consistent than from Praat.  Praat gives random high frequency pitch estimations, but the HyperX microphones perform pretty well for both pitch programs.  This is consistent with anecdotal reports where friends have commented on poor quality from the Bose microphone compared to the HyperX ones.  A similar story is present below for the Fridland passages.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/pitch_fridland_single.svg"&gt;
    &lt;img alt="Pitch tracks across the recordings of the Fridland passage" src="https://memcauliffe.com/images/polyglot_test/pitch_fridland_single.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Pitch tracks across the recordings of the Fridland passage
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   Taking a closer look at one of the recordings below, we can see generally pretty good results.  The Reaper algorithm tends to be a bit more conservative in its voiced/unvoiced decision, so there are several places where Praat estimates pitch without a corresponding Reaper estimate.  Conversely, there are also places where Reaper reports pitch and praat does not, particularly in creaky voice situations. For example, around second 23, where the glottal stop for “at” causes creaky voice.  Reaper reports a dramatic dip in pitch, but Praat just gives up.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single_hyperx_wired_noise.svg"&gt;
    &lt;img alt="Pitch track detail with word alignments from a single North Wind and the Sun recording (hyperx_wired_noise)" src="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single_hyperx_wired_noise.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Pitch track detail with word alignments from a single North Wind and the Sun recording (hyperx_wired_noise)
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   In general, Reaper has better performance across the full dataset and recording setups.  It’s a bit harder to set up and compile than Praat, but I don’t think the choice between the two will have a meaningful difference at larger scales of data.
  &lt;/p&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="summing-up"&gt;
 &lt;h1&gt;
  Summing up
  &lt;a class="headerlink" href="#summing-up" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  I wanted to take a look at PolyglotDB for a couple of reasons.  First was to motivate the update in database versions and make sure it’s still a functional tool and not abandonware.  The second is to see what it brings to the table for smaller datasets.  The recordings here are such a small fraction of the size of the data that Polyglot was built for in the SPADE project, and I did worry that the benefits that Polyglot brings wouldn’t be apparent.  And using each microphone as a different speaker does reveal that to a certain extent.  When there’s less than 10 minutes of speech per speaker and only 25 minutes of speech, we do run into some issues.  The formant refinement and speaker adapted pitch algorithms do help combat this and give some very reasonable results for our tiny speech corpus.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="appendix"&gt;
 &lt;h1&gt;
  Appendix
  &lt;a class="headerlink" href="#appendix" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  The plot below shows one particularly bad recording (using the
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    bose
   &lt;/span&gt;
  &lt;/code&gt;
  headset) where Praat has a lot of errors.  The below plot doesn’t take advantage of the speaker adaptation algorithm as a way to showcase the performance gains from it.  The default settings in PolyglotDB (similar to Praat itself) are pretty forgiving, with a minimum pitch of 50 Hz and maximum pitch of 500 Hz.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single_bose_no_noise_base.svg"&gt;
   &lt;img alt="Pitch track for a single recording (bose_no_noise) using the base algorithm rather than the speaker adaptation" src="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single_bose_no_noise_base.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Pitch track for a single recording (bose_no_noise) using the base algorithm rather than the speaker adaptation
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  We can see some pretty horrendous pitch tracking errors (no way my voice is making it up to 500 Hz, let alone 300 Hz).  Most likely there’s a fair bit of creaky voice that’s messing up the tracking.  Using the speaker adaptation algorithm generates a first pass using the base settings above, calculates the mean pitch for the speaker, and then uses a two octave range around it to generate a more likely range for that speaker.  The results for this run are below.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single_bose_no_noise.svg"&gt;
   &lt;img alt="Pitch track for a single recording (bose_no_noise) using the speaker adaptation algorithm" src="https://memcauliffe.com/images/polyglot_test/pitch_north_wind_single_bose_no_noise.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Pitch track for a single recording (bose_no_noise) using the speaker adaptation algorithm
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  You can see that we’ve cleaned up a lot of the big errors, and the ones that remain are smaller (I’m much more likely to get close to 250 Hz than to 500 Hz).  In general, Reaper performs better than Praat just out of the box, but the speaker adaptation brings Praat pretty close.
 &lt;/p&gt;
&lt;/section&gt;</content><category term="Blog"></category><category term="polyglot"></category><category term="benchmarks"></category><category term="phonetics"></category></entry><entry><title>How much data do you need for a good MFA alignment?</title><link href="https://memcauliffe.com/how-much-data-do-you-need-for-a-good-mfa-alignment.html" rel="alternate"></link><published>2021-08-24T00:00:00-07:00</published><updated>2021-08-24T00:00:00-07:00</updated><author><name>mmcauliffe</name></author><id>tag:memcauliffe.com,2021-08-24:/how-much-data-do-you-need-for-a-good-mfa-alignment.html</id><summary type="html">&lt;p&gt;
 Forced alignment is sometimes more art than science, but let’s try to establish some rules of thumb for how much data you might need when aligning a corpus
&lt;/p&gt;</summary><content type="html">&lt;p&gt;
 [TOC]
&lt;/p&gt;



&lt;section id="overview"&gt;
 &lt;h1&gt;
  Overview
  &lt;a class="headerlink" href="#overview" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  One of the most frequent questions I get is what is the threshold for getting a “good” alignment. My usual answer is just to throw the
  &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/"&gt;
   Montreal Forced Aligner
  &lt;/a&gt;
  at the corpus and see how well it does on spot check. My other glib answer is “more is better”. The more nuanced answer is that when there’s a pretrained model on 20+ hours of speech similar to the variety you’re trying to align, that will likely generate
  &lt;em&gt;
   pretty
  &lt;/em&gt;
  good alignments.  You can also try to use the recently released command for
  &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/aligning.html#adapt-pretrained-models-to-new-dataset"&gt;
   adapting pretrained models to new datasets
  &lt;/a&gt;
  .  These solutions work for overresourced languages like English, but for fieldwork situations, they’re not going to be the best.
 &lt;/p&gt;
 &lt;p&gt;
  So say you’ve collected some audio data of some language, transcribed it with orthography, have a pronunciation dictionary, and want to generate alignments.  At what point does it make more sense to automatically align it with MFA versus a more manual process?  Let’s take a look.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="dataset"&gt;
 &lt;h1&gt;
  Dataset
  &lt;a class="headerlink" href="#dataset" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  The dataset that I’m using to evaluate quality of alignments based on the amount of training data is the Buckeye Corpus (as in
  &lt;a class="reference external" href="https://memcauliffe.com/update-on-montreal-forced-aligner-performance.html"&gt;
   my previous post about MFA performance
  &lt;/a&gt;
  ). So there is a large caveat here that this is North American English, collected in a sociolinguistic interview context, with generally good recording quality.  Aspects like noise in the background, recording quality of the mic, etc are all going to factor into the necessary quantity of training data to generate good models.  Additionally, the number of hours reported below represents the duration of speech, and not necessarily the total duration, as interview utterances and silences are removed. The total size of the Buckeye corpus is generally reported as about 40 hours, but when including just the speakers’ utterances, that drops to about 16.5 hours of speech.
 &lt;/p&gt;
 &lt;p&gt;
  The procedure I used created 195 “corpora”.  Between 1 and 39 speakers were included in a given subset, with 5 subsets per number of speaker.  The 5 subsets is to try to control for some of the variability introduced from particular speakers, since especially for the lower numbers of speakers, which speaker is included is going to affect the quality a lot.  For each of these 195 corpora, the inverse subset was generated as held-out data to test how well the model could generalize to new speakers.  The durations for each of these are below.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_duration.svg"&gt;
   &lt;img alt="Durations of the various training" src="https://memcauliffe.com/images/data_comp/data_comp_duration.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Durations of the various training runs (and the durations of the held out data)
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  Some speakers certainly have more data than others and including one over the other is going to cause some variation, but it’s not so much that is obscures the very clear relationship of increasing the number of speakers increasing the duration of the data.  This might not be fully representative of your data, since the set up is based off of speakers, so if you have the same duration of data, you might have more or less speakers that could affect the quality of the alignments.
 &lt;/p&gt;
 &lt;p&gt;
  Some miscellaneous details about the training regime:
 &lt;/p&gt;
 &lt;ul class="simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    Used the same procedure of
    &lt;code class="docutils literal notranslate"&gt;
     &lt;span class="pre"&gt;
      MFA
     &lt;/span&gt;
     &lt;span class="pre"&gt;
      English
     &lt;/span&gt;
     &lt;span class="pre"&gt;
      IPA
     &lt;/span&gt;
     &lt;span class="pre"&gt;
      train
     &lt;/span&gt;
    &lt;/code&gt;
    in the
    &lt;a class="reference external" href="https://memcauliffe.com/update-on-montreal-forced-aligner-performance.html"&gt;
     post about MFA performance
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Used Linux installation of MFA to allow for easier use of symbolic links in creating the subset corpora
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    The timings below happened over a long period of time and often I was doing other stuff while it ran in the background, so take them with a grain of salt (shout out to
    &lt;a class="reference external" href="https://roguebook.net/"&gt;
     Roguebook
    &lt;/a&gt;
    which provided me with many hours of entertainment during the training and alignment runs over the past few weeks)
   &lt;/p&gt;
  &lt;/li&gt;
 &lt;/ul&gt;
&lt;/section&gt;



&lt;section id="results"&gt;
 &lt;h1&gt;
  Results
  &lt;a class="headerlink" href="#results" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  In general, and unsurprisingly, the more speakers in the training set, the more time MFA takes to train.  There are some deviations during points when I was using my computer for other purposes in parallel, but in general each training took under an hour (with 12 parallel cores).  The parallelization in MFA is based on speakers, so for the smaller subsets, it can’t take as much advantage of multiprocessing.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_timing.svg"&gt;
   &lt;img alt="Time to train" src="https://memcauliffe.com/images/data_comp/data_comp_timing.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Time to train
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  In addition to looking at how the alignments perform on the training data, I also used the held out data for each subset to give a sense of overall how good the model generated is, and to give a sense of how generalizable the acoustic models are to other speakers of the same variety.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_align_timing.svg"&gt;
   &lt;img alt="Time to align held out data" src="https://memcauliffe.com/images/data_comp/data_comp_align_timing.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Time to align held out data, note that the y-axis is log-scaled as the time to align held out data with lower amounts of training data can get ridiculously long
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  In general most alignments took less than 10 minutes, but for the runs with lower number of speakers in the training data, there was a pretty substantial explosion of time required to generate alignments for held out data.  The reason for this can be seen below in the log-likelihoods. The log-likelihoods for training are not super useful for comparing quality because the dataset is completely different in each run, but they do give a sense of how overfitted a given model is.  You can see below that log-likelihood of training peaks around 5-6 speakers, which correlates with the peak in training time above.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_log_like.svg"&gt;
   &lt;img alt="Log-likelihoods after training" src="https://memcauliffe.com/images/data_comp/data_comp_log_like.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Log-likelihoods after training
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  When looking at the log-likelihood over the held out data, we don’t really see a trough in log-likelihood corresponding to the peak in overfitting. The alignments in the 5-6 speaker range aren’t suffering as much as we might first think. The alignment beam in MFA is a pretty forgiving 100 with 400 as a retry beam, whereas for training this beam is much more restrictive at 10 with 40 for retry, so alignment has the ability to keep a larger range of suboptimal candidates at the cost of larger lattices. The overfitted models take advantage of the larger beam and generate larger lattices, leading to the super long processing times.  The Viterbi algorithm has a time complexity of $O(K^2T)$ where K is the number states (constrained by the beam width) and T the number of frames (if you’re curious about the beam search algorithm take a look
  &lt;a class="reference external" href="https://d2l.ai/chapter_recurrent-modern/beam-search.html"&gt;
   here
  &lt;/a&gt;
  ).
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_align_log_like.svg"&gt;
   &lt;img alt="Log-likelihoods after aligning held out data" src="https://memcauliffe.com/images/data_comp/data_comp_align_log_like.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Log-likelihoods after aligning held out data
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  The overfitting is largely an issue of temporal performance, and it looks like the log likelihood stabilizes around 10 ish speakers. Overfitting isn’t really an evil here that it normally is in model training, since the goal is usually just to generate the best alignments as possible on the training data.  If the goal is to generate a model for ASR transcription or more widespread use, then this overfitting becomes a larger concern.  To take a more in depth look, we’ll look at actual alignment errors in the training data and in held out data.  These are largely distinct cases, as when you have a large (enough) set of target utterances to align, you care more about performance on training data, and when you distribute models you care more about the generalizability of the model.
 &lt;/p&gt;
 &lt;section id="results-on-training-data-alignment"&gt;
  &lt;h2&gt;
   Results on training data alignment
   &lt;a class="headerlink" href="#results-on-training-data-alignment" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   First we’ll take a look at how the alignments stack up on the training data.  This will be the usual use case for fieldwork data, where you just want to generate alignments for phonetic analysis.  To begin with, let’s take a look at the word boundaries.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_word_boundaries.svg"&gt;
    &lt;img alt="Word boundary errors in training data" src="https://memcauliffe.com/images/data_comp/data_comp_word_boundaries.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Word boundary errors in training data, colorboxes represent performance of
    &lt;code&gt;
     MFA English IPA train
    &lt;/code&gt;
    on all Buckeye speakers
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   Word boundaries show some variability towards the lower end of training speakers, but stabilizes around 20 speakers, but in general it oscillates close to the values for the full training set across all the subsets. Honestly though, the scale of errors is very comparable between reduced training speakers and the full corpus.
  &lt;/p&gt;
  &lt;p&gt;
   There’s always quite a bit of variation in selected CVC boundaries.  The boundary errors stabilize fairly quickly, with only the smallest numbers of speakers showing increased errors.  The VC transition does stabilize much later, around the 27 speaker mark.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_cvc_phone_boundaries.svg"&gt;
    &lt;img alt="Phone boundary error rate in selected CVC words" src="https://memcauliffe.com/images/data_comp/data_comp_cvc_phone_boundaries.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Phone boundary error rate in selected CVC words in training data, colorboxes represent performance of
    &lt;code&gt;
     MFA English IPA train
    &lt;/code&gt;
    on all Buckeye speakers
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   For phone boundaries across the training data, we can see that errors are generally above the full run until about 27 speakers again.  However, one thing to note is that the scale of this plot is much smaller than the above, so the increase in error rate isn’t too bad.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_average_phone_boundary_error.svg"&gt;
    &lt;img alt="Phone error rates across training data" src="https://memcauliffe.com/images/data_comp/data_comp_average_phone_boundary_error.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Phone error rates across training data, the colorbox represents performance of
    &lt;code&gt;
     MFA English IPA train
    &lt;/code&gt;
    on all Buckeye speakers
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   In general, the performance across all training runs is not too bad.  For reference, the overall mean phone error for FAVE and MAUS on the Buckeye corpus is 22-23 ms (see the
   &lt;a class="reference external" href="https://memcauliffe.com/update-on-montreal-forced-aligner-performance.html"&gt;
    previous metrics post
   &lt;/a&gt;
   for more comparison to other aligners, I’ve only included the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     MFA
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     English
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     IPA
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     train
    &lt;/span&gt;
   &lt;/code&gt;
   results in the above plots for visual clarity). So performance is generally better and pretty consistent once you hit the 5-10 speaker range, I would say, which corresponds to about 3-5 hours of speech. One outstanding question from this is whether increased speakers (and less data per speaker) might hurt performance, but I think 3-5 hours is probably a pretty good lower bound on good performance on the training data itself.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="results-on-held-out-data-alignment"&gt;
  &lt;h2&gt;
   Results on held out data alignment
   &lt;a class="headerlink" href="#results-on-held-out-data-alignment" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   Another use case is training a model (or having a pretrained model like the ones distributed on MFA’s
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/pretrained_models.html#pretrained-acoustic-models"&gt;
    pretrained model page
   &lt;/a&gt;
   ) and applying this model to new data.  So the question here is basically how well do the models we trained above generalize to new speakers within the same dialect as the training data?
  &lt;/p&gt;
  &lt;p&gt;
   Starting with word boundary distances, we can see some pretty stark errors for the lower numbers of speakers.  Around about 20 speakers we hit around the target of the full training data, or at least they’re at a similar level to what those models performed on the training data.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_align_word_boundaries.svg"&gt;
    &lt;img alt="Word boundary errors in held out data" src="https://memcauliffe.com/images/data_comp/data_comp_align_word_boundaries.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Word boundary errors in held out data, colorboxes represent performance of
    &lt;code&gt;
     MFA English IPA train
    &lt;/code&gt;
    on all Buckeye speakers
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   For the phone boundary errors in selected CVC words, it’s not super good results, particularly at the lower end of speakers, to be expected.  Impressionistically, it again looks like 20 speakers is the point where it gets in the same ballpark as the full training run.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_align_cvc_phone_boundaries.svg"&gt;
    &lt;img alt="Phone boundary error rate in selected CVC words in held out data" src="https://memcauliffe.com/images/data_comp/data_comp_align_cvc_phone_boundaries.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Phone boundary error rate in selected CVC words in held out data, colorboxes represent performance of
    &lt;code&gt;
     MFA English IPA train
    &lt;/code&gt;
    on all Buckeye speakers
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   For phone errors across all words, performance gets close to the best performance around that 20 speaker mark again.  At that point we’re in the 19-21 ms range that we saw above for where the models generally fell on their training data.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/data_comp/data_comp_align_average_phone_boundary_error.svg"&gt;
    &lt;img alt="Phone error rates across held out data" src="https://memcauliffe.com/images/data_comp/data_comp_align_average_phone_boundary_error.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    Phone error rates across held out data, colorbox represents performance of
    &lt;code&gt;
     MFA English IPA train
    &lt;/code&gt;
    on all Buckeye speakers
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   So in general, I think the recommendation here is that around 20 speakers (corresponding to about 8-10 hours of training audio) generates a model that’s pretty good at generalizing to new speakers in the same variety.  That caveat’s pretty important, as the farther away from the specific variety, the worse the generalization is going to be.  Another note is that I didn’t do any balancing or control of speaker gender in the training data, so that would definitely affect generalization.
  &lt;/p&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="summing-up"&gt;
 &lt;h1&gt;
  Summing up
  &lt;a class="headerlink" href="#summing-up" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  So hopefully this was a useful look at training data and how it impacts MFA alignments.  Based on the above, I would recommend the following rules of thumb:
 &lt;/p&gt;
 &lt;ul class="simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    If you care only about alignments of the training data, 3-5 hours should be enough.
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      Caveat: increasing the number of speakers/varieties in the training data will likely need more training data
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    If you care about generating models for more widespread use, 8-10 should be enough for generalizing to the same variety
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      The more speakers the better, but also more speakers should need more data
     &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;p&gt;
      I usually recommend about 20 hours for a decently performant model
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
 &lt;/ul&gt;
&lt;/section&gt;</content><category term="Blog"></category><category term="mfa"></category><category term="benchmarks"></category><category term="forced alignment"></category></entry><entry><title>Speaker dictionaries and multilingual IPA</title><link href="https://memcauliffe.com/speaker-dictionaries-and-multilingual-ipa.html" rel="alternate"></link><published>2021-08-15T00:00:00-07:00</published><updated>2021-08-15T00:00:00-07:00</updated><author><name>mmcauliffe</name></author><id>tag:memcauliffe.com,2021-08-15:/speaker-dictionaries-and-multilingual-ipa.html</id><summary type="html">&lt;p&gt;
 Let’s take a closer look at some new features in MFA 2.0, multilingual IPA and speaker-specific dictionaries and how they can be used to align multi-dialectal and multilingual corpora
&lt;/p&gt;</summary><content type="html">&lt;p&gt;
 [TOC]
&lt;/p&gt;



&lt;section id="overview"&gt;
 &lt;h1&gt;
  Overview
  &lt;a class="headerlink" href="#overview" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  There’s a couple of new features in
  &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/"&gt;
   Montreal Forced Aligner
  &lt;/a&gt;
  2.0 that I’d like to cover in a bit more depth to showcase how they might be useful for other people’s workflows, namely
  &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/dictionary.html#per-speaker-dictionaries"&gt;
   speaker-specific dictionaries
  &lt;/a&gt;
  and the
  &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/dictionary.html#multilingual-ipa-mode"&gt;
   multilingual IPA mode
  &lt;/a&gt;
  .  I conceived of these in the context of a multilingual aligner that uses IPA pronunciation dictionaries to generate “pretty good” alignments for languages where you don’t have much annotated data yet, but want to get to reasonable boundaries for acoustic analysis.
 &lt;/p&gt;
 &lt;p&gt;
  There are already aspects of MFA that play into the idea of adaptation to new contexts, namely phone clustering and speaker adaptation. Phone clustering arose to combat the problem of sparsity in creating triphone models.  In monophone models (i.e. those that do not take phonological context into account), you’re likely to see very good representation for each phone (with the exception perhaps of phones in loanwords).  Once you move to triphone models and start to look at the preceding and following phones, you’ll hit problems with seeing all combinations.  For a word like “Sri” in “Sri Lanka”, we’ll have many instances of
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /s/
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /ɹ/
   &lt;/span&gt;
  &lt;/code&gt;
  , and
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /i/
   &lt;/span&gt;
  &lt;/code&gt;
  occurring throughout a corpus, but very few instances of
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /sɹi/
   &lt;/span&gt;
  &lt;/code&gt;
  as a triphone.  To solve the issue of these low counts, phone clustering looks to combine similar model states across triphones.  So in
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /sɹi/
   &lt;/span&gt;
  &lt;/code&gt;
  , the
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /ɹ/
   &lt;/span&gt;
  &lt;/code&gt;
  can leverage
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /ɹ/
   &lt;/span&gt;
  &lt;/code&gt;
  in other more common phonological contexts.  You can also think of it as similar to modelling allophonic variation, as the stops in triphones like
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /ɪti/
   &lt;/span&gt;
  &lt;/code&gt;
  and
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /ɪdi/
   &lt;/span&gt;
  &lt;/code&gt;
  can be modelled with the same state capturing a flap, even if it’s not explicitly coded in the pronunciation dictionary.
 &lt;/p&gt;
 &lt;p&gt;
  The speaker adaptation step transforms features from an initial alignment in a speaker independent feature space to a speaker normalized feature space.  You can think about this a bit like vowel space normalization, where the vowel space for two people of the same dialect in raw acoustic formant space don’t correspond, but normalizing the formants yields a more consistent vowel space for a dialect.
 &lt;/p&gt;
 &lt;p&gt;
  We can apply this logic to the multilingual IPA mode. Say two languages both have a sound that’s transcribed
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /ɛ/
   &lt;/span&gt;
  &lt;/code&gt;
  , speakers of these two languages will produce it slightly (or maybe even not so slightly) different.  But with the phone clustering and speaker transforms, we can (probably) model both
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /ɛ/
   &lt;/span&gt;
  &lt;/code&gt;
  phones pretty well.  At least to the point that good forced alignments are possible, because forced alignment is a much more constrained problem space than something like large vocabulary ASR.
 &lt;/p&gt;
 &lt;section id="introducing-speaker-dictionaries"&gt;
  &lt;h2&gt;
   Introducing speaker dictionaries
   &lt;a class="headerlink" href="#introducing-speaker-dictionaries" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   So that’s the MFA 1.0 feature set that could support multilingual models.  However there’s a couple more issues to tackle to make it a more manageable problem. The first is speaker dictionaries.  There is an assumption in ASR of one pronunciation dictionary to rule them all. That is, there is a singular lexicon that all possible pronunciations should be drawn from.  This assumption kinda works okay with the above methods for dealing with variability, since it can cover a decent chunk of speaker variability (and some dialect variability), but once you get into the realm of deletions or very different pronunciations it starts to fall apart.  Dialects in English that are r-ful versus those that are r-less are going to run into confusions for words like “center” (
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /s
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ɛ
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     n
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     t
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ɚ/
    &lt;/span&gt;
   &lt;/code&gt;
   vs
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /s
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ɛ
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     n
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     t
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ə/
    &lt;/span&gt;
   &lt;/code&gt;
   ).  It is
   &lt;em&gt;
    possible
   &lt;/em&gt;
   that the system will learn and output the correct variant, but if we can constrain the system to only produce correct variants per dialect/speaker, then it’s just much easier for the system to learn the acoustic models overall.
  &lt;/p&gt;
  &lt;p&gt;
   The problem gets even larger when you consider two languages that have radically different phonologies but lots of shared vocabulary.  A shared lexicon between English and French will have a decent overlap in orthographical forms, but the pronunciations for those shared words are going to be completely different.  As a concrete example, compare “centre” between French (
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /s
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ɑ̃
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     t
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ʁ
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ə/
    &lt;/span&gt;
   &lt;/code&gt;
   ) and British English (
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /s
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ɛ
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     n
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     t
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ə/
    &lt;/span&gt;
   &lt;/code&gt;
   ).  Mistakenly selecting the French pronunciation for an English speaker will result in no
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /n/
    &lt;/span&gt;
   &lt;/code&gt;
   being modelled, and might lead to issues later on when you do have a sequence of an oral vowel and a nasal consonant.  Just in general if we can remove (well, reduce) the noise and variability in the pronunciation dictionary, we can constrain the problem space and learn better models.
  &lt;/p&gt;
  &lt;p&gt;
   The solution in the current version of MFA 2.0 is to allow the user to
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/dictionary.html#per-speaker-dictionaries"&gt;
    specify dictionaries by speaker
   &lt;/a&gt;
   . So we can say given a speaker and transcript, here is a much smaller list of pronunciation variants that can be chosen.  To do this, MFA accepts a
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     .yaml
    &lt;/span&gt;
   &lt;/code&gt;
   file as an argument to the dictionary path which will be parsed as a mapping between speakers and dictionaries.  So the command below
  &lt;/p&gt;
  &lt;div class="highlight-none notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;::bash
mfa train /path/to/corpus /path/to/dictionary.txt /path/to/output_directory
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   becomes
  &lt;/p&gt;
  &lt;div class="highlight-none notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;::bash
mfa train /path/to/corpus /path/to/speaker_dictionaries.yaml /path/to/output_directory
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   Where
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /path/to/speaker_dictionaries.yaml
    &lt;/span&gt;
   &lt;/code&gt;
   is a file that looks like:
  &lt;/p&gt;
  &lt;div class="highlight-none notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;::yaml
default: english_ipa

uk_speaker_one: /path/to/english_uk_ipa.txt
uk_speaker_two: /path/to/english_uk_ipa.txt
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   The only requirement is that one key specifies the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     default
    &lt;/span&gt;
   &lt;/code&gt;
   dictionary, which will be used for all speakers that do not have an explicit dictionary.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="multilingual-ipa-mode"&gt;
  &lt;h2&gt;
   Multilingual IPA mode
   &lt;a class="headerlink" href="#multilingual-ipa-mode" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/dictionary.html#multilingual-ipa-mode"&gt;
    Multilingual IPA mode
   &lt;/a&gt;
   is a flag specified during training that transforms IPA characters when parsing the dictionary.  The idea is to preserve quality contrasts and remove length markers (i.e., collapse long and short vowels) and to split digraphs into their component sounds (i.e., split
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /eɪ
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     tʃ/
    &lt;/span&gt;
   &lt;/code&gt;
   into
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /e
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ɪ
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     t
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     ʃ/
    &lt;/span&gt;
   &lt;/code&gt;
   ).  One consequence of splitting digraphs is the minimum duration for these sounds will be greater (60ms rather than 30ms), but given the dynamics and complexities of these sounds, I think that’s a reasonable condition on them.  Triphthongs, like in Mandarin, will likewise be split into three separate vowels.
  &lt;/p&gt;
  &lt;p&gt;
   The list of diacritics that multilingual IPA mode will strip are:
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Diacritic
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Description
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Example Input
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Example Output
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌ː
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Long
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       iː
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       i
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌ˑ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Half-long
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       iˑ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       i
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌̆
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Extra short
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ĭ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       i
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌̩
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Syllabic
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       m̩
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       m
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌̯  ◌̑
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Non-syllabic
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ʊ̯
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ʊ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌͡◌
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Linking, not necessary in MFA because phones are delimited by spaces
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       t͡ʃ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       tʃ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌‿◌
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Linking, not necessary in MFA because phones are delimited by spaces
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       t‿ʃ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       tʃ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ◌͜◌
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Linking, not necessary in MFA because phones are delimited by spaces
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       t͜ʃ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       tʃ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;p&gt;
   The following are the default digraph patterns for English.  Note that digraph splitting happens after removing the diacritics above, so in cases of affricates with linking bars, the bar will be removed and then the component characters will be split.
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Digraph pattern
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Description
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Example Input
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Example Output
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       [dt][szʒʃʐʑʂɕç]
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Affricates
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       tʃ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       t ʃ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       [aoɔe][ʊɪ]
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       Diphthongs
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ɔɪ
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ɔ ɪ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;p&gt;
   The above settings are primarily useful for the
   &lt;a class="reference external" href="https://memcauliffe.com/bootstrapping-an-ipa-dictionary-for-english-using-montreal-forced-aligner-20.html"&gt;
    IPA English dictionary that I’m working on
   &lt;/a&gt;
   .  To modify the settings, simply create a
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/configuration_align.html#default-training-config-file"&gt;
    train_config.yaml
   &lt;/a&gt;
   and add/modify the following settings as necessary:
  &lt;/p&gt;
  &lt;div class="highlight-none notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;::yaml

strip_diacritics:
  - "ː"  # long, i.e. /ɑː/
  - "ˑ"  # half long, i.e. /ɑˑ/
  - "̆"  # extra short, i.e. /ĭ/
  - "̯"   # non syllabic, i.e. /i̯/
  - "͡"  # linking, i.e. /d͡ʒ/
  - "‿"  # linking, i.e. /d‿ʒ/
  - "͜"  # linking, i.e. /d͜ʒ/
  - "̩"   # syllabic, i.e. /n̩/

digraphs:
  - "[dt][szʒʃʐʑʂɕç]" # affricates
  - "[aoɔe][ʊɪ]" # diphthongs
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   The digraphs will be parsed into regular expressions, so you can use Python’s
   &lt;a class="reference external" href="https://docs.python.org/3/library/re.html"&gt;
    re
   &lt;/a&gt;
   syntax to specify any additional patterns that should be split into separate characters.
  &lt;/p&gt;
  &lt;p&gt;
   One final thing important to note is that the modifications are all internal to the aligner.  When the output TextGrids are generated, the original pronunciation is used to reconstruct the output, so split digraphs will be fused back together and remove the phone-internal boundaries and diacritics will be added back in.
  &lt;/p&gt;
  &lt;section id="evaluating-the-multilingual-mode"&gt;
   &lt;h3&gt;
    Evaluating the multilingual mode
    &lt;a class="headerlink" href="#evaluating-the-multilingual-mode" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
   &lt;p&gt;
    Even though the Buckeye corpus is monolingual English corpus, we can use it to evaluate improvements that multilingual mode provide. The measures here are the same ones that I used in
    &lt;a class="reference external" href="https://memcauliffe.com/update-on-montreal-forced-aligner-performance.html"&gt;
     the updated MFA metrics blog post
    &lt;/a&gt;
    . The plot below shows
the word boundary error across the Buckeye corpus.  For comparison, I’ve included some default models from the metrics post.
   &lt;/p&gt;
   &lt;figure class="image img-fluid blog-image"&gt;
    &lt;a class="colorbox" href="https://memcauliffe.com/images/multilingual_speaker/multilingual_word_boundaries.svg"&gt;
     &lt;img alt="Word boundary errors in the Buckeye corpus" src="https://memcauliffe.com/images/multilingual_speaker/multilingual_word_boundaries.svg"/&gt;
    &lt;/a&gt;
    &lt;figcaption&gt;
     Word boundary errors in the Buckeye corpus
    &lt;/figcaption&gt;
   &lt;/figure&gt;
   &lt;p&gt;
    The word boundaries are pretty consistent across the three training conditions.  The consistency is likely the result of learning good representations of silence in the Buckeye corpus.
   &lt;/p&gt;
   &lt;figure class="image img-fluid blog-image"&gt;
    &lt;a class="colorbox" href="https://memcauliffe.com/images/multilingual_speaker/multilingual_cvc_phone_boundaries.svg"&gt;
     &lt;img alt="Phone boundary error rate in selected CVC words" src="https://memcauliffe.com/images/multilingual_speaker/multilingual_cvc_phone_boundaries.svg"/&gt;
    &lt;/a&gt;
    &lt;figcaption&gt;
     Phone boundary error rate in selected CVC words
    &lt;/figcaption&gt;
   &lt;/figure&gt;
   &lt;p&gt;
    Phone boundaries in the CVC words show pretty comparable rates, but in general nothing very conclusive. However, looking at phone errors across the whole of the corpus, we see improved phone boundary accuracy for the multilingual trained mode.
   &lt;/p&gt;
   &lt;figure class="image img-fluid blog-image"&gt;
    &lt;a class="colorbox" href="https://memcauliffe.com/images/multilingual_speaker/multilingual_average_phone_boundary_error.svg"&gt;
     &lt;img alt="Phone error rates across the whole Buckeye corpus" src="https://memcauliffe.com/images/multilingual_speaker/multilingual_average_phone_boundary_error.svg"/&gt;
    &lt;/a&gt;
    &lt;figcaption&gt;
     Phone error rates across the whole Buckeye corpus
    &lt;/figcaption&gt;
   &lt;/figure&gt;
   &lt;p&gt;
    Multilingual mode looks pretty good! It shows some additional improvements over just the IPA dictionary, but it’s pretty slight.
   &lt;/p&gt;
  &lt;/section&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="combining-multilingual-ipa-and-speaker-dictionaries"&gt;
 &lt;h1&gt;
  Combining multilingual IPA and speaker dictionaries
  &lt;a class="headerlink" href="#combining-multilingual-ipa-and-speaker-dictionaries" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  One of my major side projects is to create a corpus of esports (professional video games) casting, which is a good test case for these new features.  As an aside, a key feature of esports casting is that it is a broadcast style of spontaneous where speakers are reacting to events in game in real time.Vocabulary is much more restricted than general spontaneous speech, with in-game character and ability names repeated often, as well as player and team names. There are usually two casters that trade off turns, with a “play-by-play caster” that walks viewers through the low-level action and a “color caster” that does more analytical commentary about the bigger picture aspects of the match during any downtimes between high intensity moments.  Relevant to the new features, each caster has their own accent, with representation across British, Australian, New Zealand, and American varieties, along with many non-native speakers.
 &lt;/p&gt;
 &lt;p&gt;
  Below is an example alignment in the corpus of speech by Sideshow, who is a British English speaker who does casting in Overwatch.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/multilingual_speaker/uk_example.png"&gt;
   &lt;img alt="Example of UK speech in esports" src="https://memcauliffe.com/images/multilingual_speaker/uk_example.png"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Example of UK speech in the esports corpus, note the non rhotic pronunciations in the highlighted region (
   &lt;a href="https://memcauliffe.com/wav/uk_example.wav"&gt;
    sound file
   &lt;/a&gt;
   and
   &lt;a href="https://memcauliffe.com/textgrids/uk_example.TextGrid"&gt;
    TextGrid
   &lt;/a&gt;
   if you want to take a look)
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  The above can be achieved with a single dictionary, of course, but what’s handy is being able to align a single file with speakers of different dialects (or languages). In the below example, there are two Overwatch casters, Nekkra and Tridd. Nekkra is a speaker of American English, whereas Tridd speaks a British dialect.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/multilingual_speaker/speaker_dictionary_example.png"&gt;
   &lt;img alt="Word boundary errors in the Buckeye corpus" src="https://memcauliffe.com/images/multilingual_speaker/speaker_dictionary_example.png"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Example of US and UK speakers aligned in the same file, note the non rhotic pronunciation in the highlighted region versus the rhoticity earlier (
   &lt;a href="https://memcauliffe.com/wav/speaker_dictionary_example.wav"&gt;
    sound file
   &lt;/a&gt;
   and
   &lt;a href="https://memcauliffe.com/textgrids/speaker_dictionary_example.TextGrid"&gt;
    TextGrid
   &lt;/a&gt;
   if you want to take a look)
  &lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/section&gt;



&lt;section id="summing-up"&gt;
 &lt;h1&gt;
  Summing up
  &lt;a class="headerlink" href="#summing-up" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  So that was a brief look into a couple of new features targeting datasets that use different speech varieties, either multiple dialects or multiple languages, with the same phone set.  Multilingual IPA uses an internal representation of a simplified phone set to maximize similarities and reduce complexity while recombining and formatting the output to match the pronunciation dictionary representations. Speaker dictionaries allow for specifying pronunciation dictionaries to vary by speaker, while still sharing a single acoustic model, so the overall modelling should be more accurate and alignments better.  The actual projects that I’m using these features for are still very much in progress, but hopefully these features will be helpful for you!
 &lt;/p&gt;
&lt;/section&gt;</content><category term="Blog"></category><category term="mfa"></category><category term="tutorial"></category><category term="forced alignment"></category></entry><entry><title>Update on Montreal Forced Aligner performance</title><link href="https://memcauliffe.com/update-on-montreal-forced-aligner-performance.html" rel="alternate"></link><published>2021-08-03T00:00:00-07:00</published><updated>2021-08-03T00:00:00-07:00</updated><author><name>mmcauliffe</name></author><id>tag:memcauliffe.com,2021-08-03:/update-on-montreal-forced-aligner-performance.html</id><summary type="html">&lt;p&gt;
 Take a look at how MFA 2.0 stacks up against the first version and a couple of other aligners in English
&lt;/p&gt;</summary><content type="html">&lt;p&gt;
 [TOC]
&lt;/p&gt;



&lt;section id="overview"&gt;
 &lt;h1&gt;
  Overview
  &lt;a class="headerlink" href="#overview" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  The
  &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/"&gt;
   Montreal Forced Aligner
  &lt;/a&gt;
  version 1.0 released on May 18, 2017, with the Interspeech paper appearing that year as
well. In the four years since, it has changed considerably and with the eventual release of 2.0 once it feels a bit more
stable, I thought I’d take a moment to analyze some performance experiments that I’ve been playing around with.
 &lt;/p&gt;
 &lt;p&gt;
  In addition to features internal to MFA, I also want to take a look at how the performance compares
to
  &lt;a class="reference external" href="https://github.com/JoFrhwld/FAVE"&gt;
   FAVE
  &lt;/a&gt;
  and
  &lt;a class="reference external" href="https://www.clarin.eu/showcase/webmaus-automatic-segmentation-and-labelling-speech-signals-over-web"&gt;
   MAUS
  &lt;/a&gt;
  , as the
other two standards in the field. At some point I’d like to get
  &lt;a class="reference external" href="https://labbcat.canterbury.ac.nz/system/"&gt;
   LaBB-CAT
  &lt;/a&gt;
  ’s
aligner set up, but that’s a bit more involved than the other two and leverages the same pretrained acoustic model as
FAVE. If there are other aligner systems out there that I should benchmark, let me know.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="methodology"&gt;
 &lt;h1&gt;
  Methodology
  &lt;a class="headerlink" href="#methodology" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;section id="dataset"&gt;
  &lt;h2&gt;
   Dataset
   &lt;a class="headerlink" href="#dataset" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The benchmark dataset is derived from the
   &lt;a class="reference external" href="https://buckeyecorpus.osu.edu/"&gt;
    Buckeye corpus
   &lt;/a&gt;
   , the same as
the
   &lt;a class="reference external" href="https://www.isca-speech.org/archive/Interspeech_2017/pdfs/1386.PDF"&gt;
    2017 Interspeech paper
   &lt;/a&gt;
   , where utterances are
extracted with text transcriptions into small chunks of audio that are fed into the respective aligners.
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     33,370 extracted chunks
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     40 speakers
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     16.5 hours total duration
    &lt;/p&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   I’m expanding the benchmark of the Buckeye corpus . The word distance and CVC datasets are the same, but I’m also
interested in the larger phone accuracies outside the more controlled CVC dataset. I’ll cover the measures pulled from
the corpus more in depth as they come up in the results section.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="procedure"&gt;
  &lt;h2&gt;
   Procedure
   &lt;a class="headerlink" href="#procedure" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Aligner ID
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Phone set
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Alignment procedure
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       FAVE
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ARPABET
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       align
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       MAUS
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       X-Sampa
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       align
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       MFA English
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ARPABET
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       align
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       MFA English adapted
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ARPABET
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       adapt
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       MFA default train
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ARPABET
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       train_and_align
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       MFA English IPA
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       IPA
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       align
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       MFA English IPA adapted
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       IPA
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       adapt
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       MFA English IPA train
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       IPA
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       train_and_align
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;p&gt;
   The MFA runs represent a cross between training procedure and pronunciation dictionary. Training procedures are as
follows:
  &lt;/p&gt;
  &lt;ol class="arabic simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;code class="docutils literal notranslate"&gt;
      &lt;span class="pre"&gt;
       align
      &lt;/span&gt;
     &lt;/code&gt;
     : Performs an initial alignment and then computes speaker-adapted features for a second pass alignment
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;code class="docutils literal notranslate"&gt;
      &lt;span class="pre"&gt;
       adapt
      &lt;/span&gt;
     &lt;/code&gt;
     : Performs an initial alignment with an acoustic model followed by 3 rounds of speaker adaptation, alignment
and re-estimation of the model
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;code class="docutils literal notranslate"&gt;
      &lt;span class="pre"&gt;
       train_and_align
      &lt;/span&gt;
     &lt;/code&gt;
     : Performs the default training regime in MFA 2.0, which starts with a subset of utterances to train
a monophone model, expands the subset to train a triphone model, performs LDA calculations and two rounds of speaker
adaptation to refine the input features over increasing sizes of subsets.
    &lt;/p&gt;
   &lt;/li&gt;
  &lt;/ol&gt;
  &lt;p&gt;
   For pronunciation dictionaries, the ARPABET dictionary is the standard one provided via MFA’s download command. The IPA
dictionary was created recently (see
   &lt;a class="reference external" href="https://memcauliffe.com/bootstrapping-an-ipa-dictionary-for-english-using-montreal-forced-aligner-20.html"&gt;
    the blog post about it
   &lt;/a&gt;
   for
more details about its creation). Additionally, I used a newly introduced
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     multilingual_ipa
    &lt;/span&gt;
   &lt;/code&gt;
   mode that does some
normalizations to the IPA pronunciations to remove some unnecessary (for the aligner) variation (blog post coming soon!
In the meantime refer
to
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/dictionary.html#multilingual-ipa"&gt;
    the docs
   &lt;/a&gt;
   ). In all cases
of pretraining, the audio data is from LibriSpeech, just the pronunciation dictionaries differ.
  &lt;/p&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="accuracy-results"&gt;
 &lt;h1&gt;
  Accuracy Results
  &lt;a class="headerlink" href="#accuracy-results" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  Let’s begin with the replication of Interspeech paper. First step is looking at the word boundary errors. So for every
word boundary find the absolute distance between the manual annotation in the Buckeye corpus and the aligner generated
annotations. The plot below shows these by the aligner and split into whether the boundary is next to a silence or not,
as that heavily influences accuracy.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/word_boundaries.svg"&gt;
   &lt;img alt="Word boundary errors in the Buckeye corpus" src="https://memcauliffe.com/images/mfa_metrics/word_boundaries.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Word boundary errors in the Buckeye corpus
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  MFA generally looks to be performing well!  One interesting thing to highlight is that aligners trained on the Buckeye
corpus itself handle boundaries next to pauses better (though still not the same degree as within continuous speech).
This benefit is likely due to the silence models being trained on the actual audio, whereas the silence models for the
other MFA models are trained on LibriSpeech, which is overall less noisy.
 &lt;/p&gt;
 &lt;p&gt;
  Next up we have the CVC phone boundaries calculated in the Interspeech paper. To generate these, we took a list of 534
CVC word types in the Buckeye corpus (I believe originally
from
  &lt;a class="reference external" href="https://escholarship.org/content/qt21n26047/qt21n26047.pdf"&gt;
   Yao Yao’s dissertation
  &lt;/a&gt;
  ), words like
  &lt;em&gt;
   base
  &lt;/em&gt;
  ,
  &lt;em&gt;
   choose
  &lt;/em&gt;
  ,
  &lt;em&gt;
   gone
  &lt;/em&gt;
  ,
  &lt;em&gt;
   young
  &lt;/em&gt;
  , etc. For every token that matched, first we check whether the surface form from the manual annotation
and the aligner annotation have three phones, and skip if they don’t. This avoids instances where a consonant is
deleted. Following the check, we extract 4 boundaries:
 &lt;/p&gt;
 &lt;ol class="arabic simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    beginning of the initial consonant
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    between the initial consonant and the vowel
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    between the vowel and the final consonant
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    at the end of the final consonant
   &lt;/p&gt;
  &lt;/li&gt;
 &lt;/ol&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/cvc_phone_boundaries.svg"&gt;
   &lt;img alt="Phone boundary error rate in selected CVC words" src="https://memcauliffe.com/images/mfa_metrics/cvc_phone_boundaries.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Phone boundary error rate in selected CVC words
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  We can see that the word boundaries have the highest error (also note that we’re not controlling for pause boundaries
here, so that’s going to make these a bit messier). General trends are also that CV transitions are more accurate than
VC transitions, even across aligners. Somewhat surprising is that the pretrained IPA English model is doing as
well/better than the adapted and trained versions.
 &lt;/p&gt;
 &lt;p&gt;
  For completeness, here are the same summary statistics from the above plots.
 &lt;/p&gt;
 &lt;table&gt;
  &lt;thead&gt;
   &lt;tr&gt;
    &lt;th rowspan="2"&gt;
     Aligner
    &lt;/th&gt;
    &lt;th colspan="2"&gt;
     Word boundaries
    &lt;/th&gt;
    &lt;th colspan="2"&gt;
     Phone boundaries
    &lt;/th&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;th&gt;
     mean (ms)
    &lt;/th&gt;
    &lt;th&gt;
     median (ms)
    &lt;/th&gt;
    &lt;th&gt;
     mean (ms)
    &lt;/th&gt;
    &lt;th&gt;
     median (ms)
    &lt;/th&gt;
   &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
   &lt;tr&gt;
    &lt;td&gt;
     FAVE
    &lt;/td&gt;
    &lt;td&gt;
     24.8
    &lt;/td&gt;
    &lt;td&gt;
     16.6
    &lt;/td&gt;
    &lt;td&gt;
     19.2
    &lt;/td&gt;
    &lt;td&gt;
     12
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     MAUS
    &lt;/td&gt;
    &lt;td&gt;
     29.6
    &lt;/td&gt;
    &lt;td&gt;
     15
    &lt;/td&gt;
    &lt;td&gt;
     20.5
    &lt;/td&gt;
    &lt;td&gt;
     10.4
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     MFA English
    &lt;/td&gt;
    &lt;td&gt;
     23.6
    &lt;/td&gt;
    &lt;td&gt;
     15.4
    &lt;/td&gt;
    &lt;td&gt;
     16.3
    &lt;/td&gt;
    &lt;td&gt;
     11
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     MFA English adapted
    &lt;/td&gt;
    &lt;td&gt;
     23.4
    &lt;/td&gt;
    &lt;td&gt;
     15
    &lt;/td&gt;
    &lt;td&gt;
     16.6
    &lt;/td&gt;
    &lt;td&gt;
     11.1
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     MFA default train
    &lt;/td&gt;
    &lt;td&gt;
     21.1
    &lt;/td&gt;
    &lt;td&gt;
     14.1
    &lt;/td&gt;
    &lt;td&gt;
     16.9
    &lt;/td&gt;
    &lt;td&gt;
     11.3
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     MFA English IPA
    &lt;/td&gt;
    &lt;td&gt;
     21.4
    &lt;/td&gt;
    &lt;td&gt;
     14.1
    &lt;/td&gt;
    &lt;td&gt;
     15.8
    &lt;/td&gt;
    &lt;td&gt;
     9.9
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     MFA English IPA adapted
    &lt;/td&gt;
    &lt;td&gt;
     21.6
    &lt;/td&gt;
    &lt;td&gt;
     14.3
    &lt;/td&gt;
    &lt;td&gt;
     16.4
    &lt;/td&gt;
    &lt;td&gt;
     10.3
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;
     MFA English IPA train
    &lt;/td&gt;
    &lt;td&gt;
     20.2
    &lt;/td&gt;
    &lt;td&gt;
     14
    &lt;/td&gt;
    &lt;td&gt;
     16.5
    &lt;/td&gt;
    &lt;td&gt;
     10.7
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;p&gt;
  So that replicates the basic findings of the Interspeech paper. Note that the numbers for
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    MFA
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    english
   &lt;/span&gt;
  &lt;/code&gt;
  (in the
Interspeech paper labelled as
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    MFA-LS
   &lt;/span&gt;
  &lt;/code&gt;
  ) and
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    MFA
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    default
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    train
   &lt;/span&gt;
  &lt;/code&gt;
  (
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    MFA-Retrained
   &lt;/span&gt;
  &lt;/code&gt;
  in the Interspeech paper) have actually
improved very slightly from MFA 1.0 to 2.0.
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    MFA
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    english
   &lt;/span&gt;
  &lt;/code&gt;
  went from 24.1 ms mean word boundary distance to 23.6 ms, 17
ms mean phone boundary distance to 16.3 ms.
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    MFA
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    default
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    train
   &lt;/span&gt;
  &lt;/code&gt;
  went from 22.6 ms mean distance for words to 21.1 and
from 17.3 ms to 16.9 ms for phone distance.
 &lt;/p&gt;
 &lt;p&gt;
  So that’s all cool, but the main reason I really wanted to re-explore this space is to come up with some better measures
for actually measuring alignment accuracy. The phone boundary measures after all cover just CVC words, are a very small
subset of total words in the Buckeye corpus, and pointedly ignore pronunciation variation in order to make things as
controlled as possible. I think we can do better.
 &lt;/p&gt;
 &lt;p&gt;
  So the algorithm that I’ve done here is still a work in progress, but I think it’s pretty promising. The basic idea is
that we want to align intervals in different transcripts (haha, aligning the alignments) based on how close those
intervals begin and end (i.e., if they occupy the same space in the audio file, they’re likely the same segment). We
also want to incorporate some very basic phone-to-phone mapping between the different phone sets to make sure it’s not
entirely based off the timing, because the identity of phones is important too for evaluating whether an alignment is
good.
 &lt;/p&gt;
 &lt;p&gt;
  The Python code is something like this (I’ll describe it more in words after the code if you want to skip that):
 &lt;/p&gt;
 &lt;div class="highlight-none notranslate"&gt;
  &lt;div class="highlight"&gt;
   &lt;pre&gt;&lt;span&gt;&lt;/span&gt;:::python
import re
from Bio import pairwise2
import functools

MATCH_SCORE = 0
MISMATCH_SCORE = 2
GAP_START_SCORE = -5
GAP_CONTINUE_SCORE = -5


def silence_check(phone):
    return phone in {'sp', '&amp;lt;p:&amp;gt;', '', None}


def compare_labels(ref, test, aligner_name):
    if 'ipa' in aligner_name:
        mapping = ipa_mapping
    elif 'maus' in aligner_name:
        mapping = maus_mapping
    else:
        mapping = arpa_mapping
        if re.match(r'[a-z]+[0-9]', test):
            if ref == test[:-1].lower():
                return MATCH_SCORE
            else:
                return MISMATCH_SCORE
    if ref == test:
        return MATCH_SCORE
    if test in mapping and mapping[test] == ref:
        return MATCH_SCORE
    ref = ref.lower()
    test = test.lower()
    if ref == test:
        return MATCH_SCORE
    return MISMATCH_SCORE


def overlap_scoring(firstElement, secondElement, aligner_name):
    begin_diff = abs(firstElement.minTime - secondElement.minTime)
    end_diff = abs(firstElement.maxTime - secondElement.maxTime)
    label_diff = compare_labels(firstElement.mark, secondElement.mark, aligner_name)
    return -1 * (begin_diff + end_diff + label_diff)


def align_phones(ref, test, aligner_name):
    ref = [x for x in ref]
    test = [x for x in test]
    score_func = functools.partial(overlap_scoring, aligner_name=aligner_name)
    alignments = pairwise2.align.globalcs(ref, test,
                                          score_func, GAP_START_SCORE, GAP_CONTINUE_SCORE,
                                          gap_char=['-'], one_alignment_only=True)
    overlap_count = 0
    overlap_sum = 0
    num_insertions = 0
    num_deletions = 0
    for a in alignments:
        for i, sa in enumerate(a.seqA):
            sb = a.seqB[i]
            if sa == '-':
                if not silence_check(sb.mark):
                    num_insertions += 1
                else:
                    continue
            elif sb == '-':
                if not silence_check(sa.mark):
                    num_deletions += 1
                else:
                    continue
            else:
                overlap_sum += abs(sa.minTime - sb.minTime) + abs(sa.maxTime - sb.maxTime)
                overlap_count += 1
    return overlap_sum / overlap_count, num_insertions, num_deletions
&lt;/pre&gt;
  &lt;/div&gt;
 &lt;/div&gt;
 &lt;p&gt;
  So what it does is use
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    biopython
   &lt;/span&gt;
  &lt;/code&gt;
  ’s pairwise sequence alignment algorithm with a custom match/mismatch function. The
score that we give to match/mismatch is not fully based on the label of the phone (though if it does not match, it gets
a base score of -2 vs 0 for if it does match). There are three mappings listed above (but not defined just because
they’re so long, I’ll provide tables in the appendix if you’re curious). These basically transform “known” or “
unambiguous” phones from X-Sampa, IPA and ARPABET into Buckeye’s specific phone set. In addition to the label match, we
also calculate the distance from the reference boundaries to the corresponding aligner-generated boundaries, in order to
locally constrain the alignment. The last parameter is the gap scores, which specify the penalty for inserting skips in
one of the sequences, either for insertions or deletions. The value of -5 for both seems to work pretty well for this
particular case. To illustrate the output from running with a FAVE alignment:
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/example_alignments.png"&gt;
   &lt;img alt="Example phone-to-phone alignment" src="https://memcauliffe.com/images/mfa_metrics/example_alignments.png"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Example phone-to-phone alignment
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  One final thing to note is that we’re basically ignoring any mismatches due to silences, so not inserting silence is not
penalized per se.
 &lt;/p&gt;
 &lt;p&gt;
  Onto the actual results!  Well, ok, before that, a note about some removals. In analyzing the data, I found that MAUS
for some reason phonemetized
  &lt;em&gt;
   yknow
  &lt;/em&gt;
  as
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /i:keIkeIkeIkeI/
   &lt;/span&gt;
  &lt;/code&gt;
  . I’m not really sure where this is coming from, but it’s
fairly common in the Buckeye transcriptions and resulted in an inflated number of insertions. So for the following
analysis, any utterance with
  &lt;em&gt;
   yknow
  &lt;/em&gt;
  in it has been removed (2,575 utterances of 33,166 total utterances).
 &lt;/p&gt;
 &lt;p&gt;
  To begin with, let’s take a look at the phone boundary errors.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/average_phone_boundary_error.svg"&gt;
   &lt;img alt="Phone error rates across the whole Buckeye corpus" src="https://memcauliffe.com/images/mfa_metrics/average_phone_boundary_error.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Phone error rates across the whole Buckeye corpus
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  Even removing the
  &lt;em&gt;
   yknow
  &lt;/em&gt;
  utterances, MAUS is still having some issues here, which is a little weird because we weren’t
seeing these disparities show up this much in the word boundary or CVC datasets. To dig a little deeper, if we look at
this same data faceted by speaker, we can see a lot of these issues are driven by a few speakers.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/speaker_analysis.svg"&gt;
   &lt;img alt="Phone error rates across the whole Buckeye corpus" src="https://memcauliffe.com/images/mfa_metrics/speaker_analysis.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Phone boundary error analysis by speaker
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  Particularly
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s01
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s13
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s15
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s20
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s23
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s24
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s27
   &lt;/span&gt;
  &lt;/code&gt;
  , and
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    s36
   &lt;/span&gt;
  &lt;/code&gt;
  are contributing more so than others to the
increased error rate. I don’t know for sure what’s causing the issues, it might be something about vocal quality,
recording quality, or pronunciation generation that’s affecting those more so than others.
 &lt;/p&gt;
 &lt;p&gt;
  Looking at the other measures of quality, we can see that MAUS is performing the best when it comes to insertions (
when
  &lt;em&gt;
   yknow
  &lt;/em&gt;
  isn’t counted…). Additionally, you can see that IPA versions of MFA are inserting less, which makes sense
because the ARPABET versions have multiple characters for syllabic consonants (i.e.
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    /l̩/
   &lt;/span&gt;
  &lt;/code&gt;
  like in
  &lt;em&gt;
   bottle
  &lt;/em&gt;
  is
transcribed as
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    AH0
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    L
   &lt;/span&gt;
  &lt;/code&gt;
  ).
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/num_insertions.svg"&gt;
   &lt;img alt="Number of phone insertions" src="https://memcauliffe.com/images/mfa_metrics/num_insertions.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Number of phone insertions
  &lt;/figcaption&gt;
 &lt;/figure&gt;
 &lt;p&gt;
  Finally, in terms of deletions, these are less common than insertions overall. I think the primary reason for this is
that our reference is the surface form annotations in the Buckeye corpus. These surface forms are generally pretty
reduced and close to the spoken form, so our the ground truth is not citation forms. Of note, FAVE tends to insert much
more than it deletes, which is due to its reliance on CMU dictionary’s citation forms. MAUS on the flip side tends to
delete more than it inserts, likely due to the post-lexical pronunciation modelling that it does. IPA versions of MFA
tend to delete more than the ARPABET versions, I haven’t fully analyzed this, but my guess here is that some of these
phones that are still in the Buckeye surface form transcriptions get deleted in the IPA version because they’re shorter
than the minimum duration for a phone (30ms), so the cost of deleting is less for it.
 &lt;/p&gt;
 &lt;figure class="image img-fluid blog-image"&gt;
  &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/num_deletions.svg"&gt;
   &lt;img alt="Number of phone deletions" src="https://memcauliffe.com/images/mfa_metrics/num_deletions.svg"/&gt;
  &lt;/a&gt;
  &lt;figcaption&gt;
   Number of phone deletions
  &lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/section&gt;



&lt;section id="summing-up"&gt;
 &lt;h1&gt;
  Summing up
  &lt;a class="headerlink" href="#summing-up" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  MFA’s not looking too shabby!  It’s nice to see the improvements made in the transition to version 2.0 having concrete
improvements. Not surprisingly, the IPA dictionary is showing some good performance specifically with the Buckeye
dataset due to similarities in the syllabic consonants. It’s not as phonetic as the Buckeye phone set, but with the
limitation of 30ms minimum on phones, it can’t really quite get there.
 &lt;/p&gt;
 &lt;p&gt;
  Now, of course, the huge caveat to all this is that it’s English. I’d be super curious to see how performance differs
across languages, but I’m not aware of too many manually corrected datasets out there that could serve as additional
benchmarks, but I’d be curious to see how the methodology here stacks up.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="appendix"&gt;
 &lt;h1&gt;
  Appendix
  &lt;a class="headerlink" href="#appendix" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;section id="benchmark-performance-metrics"&gt;
  &lt;h2&gt;
   Benchmark performance metrics
   &lt;a class="headerlink" href="#benchmark-performance-metrics" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The accuracy metrics above are the primary point of this point, but I do want to touch on the timing benchmarks done as
part of this, as speed can be a consideration as well. The below graph shows how long each of the MFA runs took. Note
that I didn’t benchmark the FAVE or MAUS cases, since they were not really optimized for this use case, but they each
took several hours to generate, FAVE about a day’s worth of run time, MAUS about 6 hours of manual upload and download
via WebMAUS.
  &lt;/p&gt;
  &lt;p&gt;
   For the MFA runs, the following system was used:
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     12 cores
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     i9-10900KF at 3.7 GHz
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     32 GB of RAM
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Windows installation of MFA
    &lt;/p&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/timing.svg"&gt;
    &lt;img alt="MFA timing results" src="https://memcauliffe.com/images/mfa_metrics/timing.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    MFA timing results
   &lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p&gt;
   The
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     align
    &lt;/span&gt;
   &lt;/code&gt;
   runs are the quickest, coming in at under 15 minutes to generate all the TextGrids. The
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     adapt
    &lt;/span&gt;
   &lt;/code&gt;
   runs are the
next fastest, at a little over half an hour to do a couple of adaptation iterations and then align. Training
unsurprisingly takes the longest at just around an hour and a half.
  &lt;/p&gt;
  &lt;p&gt;
   The next metrics are the final average per-frame log-likelihood on the final alignment. While I haven’t had success
using this kind of metric on a per-utterance basis to figure out what files have issues like missing words, it does seem
generally useful for gauging how well an alignment system is doing. Compare the below figure with the above phone
boundary error rates across the full corpus. The log-likelihood for
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     MFA
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     English
    &lt;/span&gt;
   &lt;/code&gt;
   and
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     MFA
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     English
    &lt;/span&gt;
    &lt;span class="pre"&gt;
     adapted
    &lt;/span&gt;
   &lt;/code&gt;
   are much
lower than the other runs, and these are exactly the runs that have higher phone boundary error rate above. So at least
a sanity check that this can be used as a proxy measure for when human annotations aren’t available to compare against.
  &lt;/p&gt;
  &lt;figure class="image img-fluid blog-image"&gt;
   &lt;a class="colorbox" href="https://memcauliffe.com/images/mfa_metrics/log_like.svg"&gt;
    &lt;img alt="MFA log-likelihood results" src="https://memcauliffe.com/images/mfa_metrics/log_like.svg"/&gt;
   &lt;/a&gt;
   &lt;figcaption&gt;
    MFA log-likelihood results
   &lt;/figcaption&gt;
  &lt;/figure&gt;
 &lt;/section&gt;
 &lt;section id="phone-mappings"&gt;
  &lt;h2&gt;
   Phone mappings
   &lt;a class="headerlink" href="#phone-mappings" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;div class="highlight-python notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;maus_mapping&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;'dZ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'jh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'Z'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'zh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'6'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'er'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'tS'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ch'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'S'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'sh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'Q'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'A'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'A:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'Q:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'{'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ae'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'{:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ae'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'E'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'eh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'@'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ah'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'V'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ah'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'V:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ah'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'D'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'dh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'T'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'th'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'e'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ey'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'e:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ey'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'aU'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aw'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'@U'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ow'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'oU'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ow'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'eI'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ey'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'i:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'iy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'u:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'uw'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'u'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'uw'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'U'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'uh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'O:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ao'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'O'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ao'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'o'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ow'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'o:'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ow'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'aI'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ay'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'OI'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'oy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'oI'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'oy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'n'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'en'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'m'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'em'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'l'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'el'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'i'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'iy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'j'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'y'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'I'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ih'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'?'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'tq'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'N'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ng'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'h'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'hh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;ipa_mapping&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;'ʔ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'tq'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'i'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'iy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'h'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'hh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'iː'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'iy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɡ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'g'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɚ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'er'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɝ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'er'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɝː'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'er'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'3`'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'er'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'dʒ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'jh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'tʃ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ch'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ʒ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'zh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɑ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɑː'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aa'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ʊ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'uh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɛ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'eh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'oʊ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ow'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'aʊ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'aw'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'aɪ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ay'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɔ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ao'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɔː'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ao'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɔɪ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'oy'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'u'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'uw'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'uː'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'uw'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'æ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ae'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'eɪ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ey'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ð'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'dh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ʃ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'sh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ɹ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'r'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'j'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'y'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'θ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'th'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ə'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ah'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ŋ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ng'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'ʌ'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ah'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'n̩'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'en'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'m̩'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'em'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'l̩'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'el'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;arpa_mapping&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;'N'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'en'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'em'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'L'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'el'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
 &lt;/section&gt;
&lt;/section&gt;</content><category term="Blog"></category><category term="mfa"></category><category term="benchmarks"></category><category term="forced alignment"></category></entry><entry><title>Bootstrapping an IPA dictionary for English using Montreal Forced Aligner 2.0</title><link href="https://memcauliffe.com/bootstrapping-an-ipa-dictionary-for-english-using-montreal-forced-aligner-20.html" rel="alternate"></link><published>2021-04-19T00:00:00-07:00</published><updated>2021-04-19T00:00:00-07:00</updated><author><name>Michael McAuliffe</name></author><id>tag:memcauliffe.com,2021-04-19:/bootstrapping-an-ipa-dictionary-for-english-using-montreal-forced-aligner-20.html</id><summary type="html">&lt;p&gt;
 Want to bootstrap and clean up a new dictionary? This tutorial covers my experience creating a new IPA dictionary for English using Montreal Forced Aligner’s 2.0 functionality
&lt;/p&gt;</summary><content type="html">&lt;p&gt;
 [TOC]
&lt;/p&gt;



&lt;section id="overview"&gt;
 &lt;h1&gt;
  Overview
  &lt;a class="headerlink" href="#overview" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  One of my big tinkering projects that I’ve been thinking a lot about is a multilingual aligner that uses IPA to be able to share acoustic models across languages and maybe even help align data from languages without requiring an initial corpus of ~20 hours to get a good acoustic model. That whole project is outside the scope of the current post (but see the final thoughts section at the end for more on this). What I wanted to do with this blog series is document the end-to-end process of constructing this multilingual aligner with the hopes that these tutorials are useful for other people working with their specific data sets. With the WikiPron data sets, there’s a number of crowdsourced pronunciation dictionaries available (see
  &lt;a class="reference external" href="https://github.com/kylebgorman/wikipron/tree/master/data/scrape"&gt;
   here
  &lt;/a&gt;
  for a listing), this blog post is intended to serve as a guide for cleaning those up and bootstrapping larger pronunciation dictionaries.
 &lt;/p&gt;
 &lt;p&gt;
  What I’m currently working on is getting an IPA dictionary set up on the level of the Arpabet dictionary for LibriSpeech. The primary issue is in terms of coverage, where the
  &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/mfa-models/blob/master/dictionary/english.dict"&gt;
   English dictionary
  &lt;/a&gt;
  we use for aligning LibriSpeech has 206,518 lexical entries whereas the WikiPron English US dictionary only has 57,214 entries, leaving a large gap in the dictionary if we were to use it with supplementing.
 &lt;/p&gt;
 &lt;p&gt;
  The basic process for bootstrapping a larger dictionary with new entries was as follows:
 &lt;/p&gt;
 &lt;ol class="arabic simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    Clean up and standardize initial WikiPron dictionary
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Train a G2P model for generating IPA pronunciations for English
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Generate Out of Vocabulary (OOV) list
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Generate pronunciations using the G2P model for a subset of OOV words
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Check pronunciations generated and add new ones to the dictionary
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Retrain G2P model as necessary
   &lt;/p&gt;
  &lt;/li&gt;
 &lt;/ol&gt;
&lt;/section&gt;



&lt;section id="generating-the-initial-dictionary"&gt;
 &lt;h1&gt;
  Generating the initial dictionary
  &lt;a class="headerlink" href="#generating-the-initial-dictionary" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  The basic dictionary was downloaded from
  &lt;a class="reference external" href="https://github.com/kylebgorman/wikipron/blob/master/data/scrape/tsv/eng_latn_us_phonemic_filtered.tsv"&gt;
   WikiPron’s scrape page
  &lt;/a&gt;
  . Given Wikitionary’s crowdsourced nature, I did some initial analysis of the graphemes and phones being used. There were several foreign graphemes included, so words containing these were ignored to simplify the grapheme set:
 &lt;/p&gt;
 &lt;div class="highlight-text notranslate"&gt;
  &lt;div class="highlight"&gt;
   &lt;pre&gt;&lt;span&gt;&lt;/span&gt;% / @ ² à á â ä æ ç è é ê ë í î ï ñ ó ô õ ö ø ù ú ü ā ą č ē ę ğ ı ł ń ō ő œ ř ū ș ț ʼ ṭ ₂
&lt;/pre&gt;
  &lt;/div&gt;
 &lt;/div&gt;
 &lt;p&gt;
  All told, there were only 487 words with these characters, so removing these still left 56,727 total entries.
 &lt;/p&gt;
 &lt;p&gt;
  For processing the pronunciations, the initial phone set for the dictionary was:
 &lt;/p&gt;
 &lt;div class="highlight-text notranslate"&gt;
  &lt;div class="highlight"&gt;
   &lt;pre&gt;&lt;span&gt;&lt;/span&gt;a aː b d d͡ʒ e eː f h i iː j k l l̩ m m̩ n n̩ o oː p r s t t͡ʃ u uː v w z æ æː ð ŋ ɑ ɑː ɒ ɔ ɔː ə ɚ ɛ ɛː ɜ ɜː ɝ ɝː ɡ ɪ ɪː ɪ̯ ɫ ɹ ʃ ʊ ʊ̯ ʌ ʍ ʒ ʔ θ
&lt;/pre&gt;
  &lt;/div&gt;
 &lt;/div&gt;
 &lt;p&gt;
  The first automated pass transforming the dictionary took out ligatures. With phones in pronunciation dictionaries separated by spaces, having the ligatures is not necessary. However, the WikiPron pronunciations had some inconsistencies for digraphs for affricates and diphthongs. The following sequences were normalized:
 &lt;/p&gt;
 &lt;table class="docutils align-default"&gt;
  &lt;thead&gt;
   &lt;tr class="row-odd"&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Original WikiPron phone
     &lt;/p&gt;
    &lt;/th&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Phone for MFA dictionary
     &lt;/p&gt;
    &lt;/th&gt;
   &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /t͡ʃ/, /t ʃ/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /tʃ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /d͡ʒ/, /d ʒ/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /dʒ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /e i/, /e ɪ/, /e ɪ̯/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /eɪ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /a i/, /a ɪ/, /a j/, /a ɪ̯/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /aɪ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /a u/, /a ʊ/, /a ʊ̯/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /aʊ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /o u/, /o ʊ/, /o w/, /o ʊ̯/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /oʊ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /o i/, /o ɪ/, /ɔ i/, /ɔ ɪ/, /ɔ ɪ̯/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɔɪ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;p&gt;
  Even following this, there were some /e/, /o/ and /a/ phones left over. These were manually corrected into some combination of /eɪ/, /ɛ/, /oʊ/, /ɔ/, /ɑ/. Additionally, some orthographic characters were used in pronunciations, so these were replaced with the correct IPA character:
 &lt;/p&gt;
 &lt;table class="docutils align-default"&gt;
  &lt;thead&gt;
   &lt;tr class="row-odd"&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Original WikiPron phone
     &lt;/p&gt;
    &lt;/th&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Phone for MFA dictionary
     &lt;/p&gt;
    &lt;/th&gt;
   &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɒ/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɔ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /r/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɹ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ʍ/, /h w/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /w/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɫ/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /l/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;p&gt;
  The voiceless /ʍ/ was merged with /w/, both because these sounds are merged in most American dialects, and /ʍ/ appeared in a very inconsistent subset of pronunciations. Similarly, /ɫ/ was merged with /l/ due to a similar inconsistency.
 &lt;/p&gt;
 &lt;p&gt;
  Vowels before rhotics were standardized as well to the following set based on the set listed on the
  &lt;a class="reference external" href="https://en.wikipedia.org/wiki/English_phonology#Vowels"&gt;
   English phonology wikipedia
  &lt;/a&gt;
  .
 &lt;/p&gt;
 &lt;table class="docutils align-default"&gt;
  &lt;thead&gt;
   &lt;tr class="row-odd"&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Lexical set
     &lt;/p&gt;
    &lt;/th&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      English US IPA
     &lt;/p&gt;
    &lt;/th&gt;
   &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      NURSE
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɝ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      START
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɑr/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      NORTH
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɔr/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      FORCE
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɔr/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      NEAR
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɪr/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      SQUARE
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɛr/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      CURE
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ʊr/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;p&gt;
  To make the transcriptions in WikiPron adhere to the sets above, the following transformations were applied to standardize the vowel-rhotic sequences:
 &lt;/p&gt;
 &lt;table class="docutils align-default"&gt;
  &lt;thead&gt;
   &lt;tr class="row-odd"&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Original WikiPron phone
     &lt;/p&gt;
    &lt;/th&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Phone for MFA dictionary
     &lt;/p&gt;
    &lt;/th&gt;
   &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /æ ɹ/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɛ r/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /i ɹ/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɪ ɹ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;p&gt;
  Finally some unstressed syllabic consonants were created to make them consistent with syllabic consonants elsewhere and to aid in alignment.
 &lt;/p&gt;
 &lt;table class="docutils align-default"&gt;
  &lt;thead&gt;
   &lt;tr class="row-odd"&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Original WikiPron phone
     &lt;/p&gt;
    &lt;/th&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Phone for MFA dictionary
     &lt;/p&gt;
    &lt;/th&gt;
   &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ə n/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /n̩/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ə l/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /l̩/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ə m/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /m̩/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ə ɹ/
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      /ɚ/
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;p&gt;
  In unstressed syllables, Arpabet pronunciations usually have separate schwa-consonant sequences (i.e.
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    AH0
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    L
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    AH0
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    N
   &lt;/span&gt;
  &lt;/code&gt;
  ,
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    AH0
   &lt;/span&gt;
   &lt;span class="pre"&gt;
    M
   &lt;/span&gt;
  &lt;/code&gt;
  ), but not for syllabic r (i.e.
  &lt;code class="docutils literal notranslate"&gt;
   &lt;span class="pre"&gt;
    ER0
   &lt;/span&gt;
  &lt;/code&gt;
  ). This leads to alignment issues using these dictionaries, because the default settings lead to 30ms minimum for phones, so these unstressed syllables have minimum 60ms duration. In running spontaneous speech, we’re unlikely to see unstressed syllables that are that long, and the quality of these syllables are much more like their consonant articulations than a vowel-consonant sequence.
 &lt;/p&gt;
 &lt;p&gt;
  For reference, the final phone inventory is:
 &lt;/p&gt;
 &lt;table class="docutils align-default"&gt;
  &lt;thead&gt;
   &lt;tr class="row-odd"&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Consonants
     &lt;/p&gt;
    &lt;/th&gt;
    &lt;th class="head"&gt;
     &lt;p&gt;
      Vowels
     &lt;/p&gt;
    &lt;/th&gt;
   &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      p
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      i
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      b
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      iː
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      t
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      u
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      d
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      uː
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      k
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɪ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɡ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ʊ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      ʔ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      eɪ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      m
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      oʊ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      m̩
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɛ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      n
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɛː
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      n̩
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɝ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      ŋ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɝː
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      f
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ʌ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      v
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ə
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      θ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɚ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      ð
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɔ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      s
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɔː
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      z
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      æ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      ʃ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      æː
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      ʒ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɑ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      tʃ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɑː
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      dʒ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      aɪ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      h
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      aʊ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      j
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɔɪ
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      w
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      l̩
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-even"&gt;
    &lt;td&gt;
     &lt;p&gt;
      l
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="row-odd"&gt;
    &lt;td&gt;
     &lt;p&gt;
      ɹ
     &lt;/p&gt;
    &lt;/td&gt;
    &lt;td&gt;
     &lt;p&gt;
     &lt;/p&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
 &lt;/table&gt;
 &lt;p&gt;
  As a more general point, the specific purpose for this dictionary is for alignment and speech tech and does not strictly represent English phonology per se. However, it’s also not strictly phonetic either, as /t/ and /d/ flapping are not represented in pronunciations. As the above mentions, the most important part is number of segments, since allophonic variation can be capture through the use of clustered triphones in alignment systems.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="bootstrapping-a-new-dictionary"&gt;
 &lt;h1&gt;
  Bootstrapping a new dictionary
  &lt;a class="headerlink" href="#bootstrapping-a-new-dictionary" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  Following the transformations above, we have a reasonable starting point for bootstrapping a large scale dictionary.
 &lt;/p&gt;
 &lt;section id="training-a-g2p-model"&gt;
  &lt;h2&gt;
   Training a G2P model
   &lt;a class="headerlink" href="#training-a-g2p-model" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   Following
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/installation.html"&gt;
    installation of MFA
   &lt;/a&gt;
   into a conda environment, the first step is train a G2P model:
  &lt;/p&gt;
  &lt;div class="highlight-default notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;mfa&lt;/span&gt; &lt;span class="n"&gt;train_g2p&lt;/span&gt; &lt;span class="n"&gt;english_us&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;txt&lt;/span&gt; &lt;span class="n"&gt;english_us_ipa_g2p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;zip&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;num_jobs&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   And voila! Sort of. It takes me about 30 minutes to train a G2P model over the (as of this post) 60,756 words in english_us.txt. The command above uses 13 processes to perform training, so depending on your set up, you may need to adjust it (the default is 3). The training can be customized (see the
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/g2p_model_training.html"&gt;
    MFA docs on training G2P models
   &lt;/a&gt;
   for more details), but the default configuration should be a reasonable set up for both the current English dictionary and other dictionaries you might want to train on.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="get-list-of-unknown-words"&gt;
  &lt;h2&gt;
   Get list of unknown words
   &lt;a class="headerlink" href="#get-list-of-unknown-words" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   Once the G2P model is trained, we can generate a list of OOV words by running MFA’s validator utility:
  &lt;/p&gt;
  &lt;div class="highlight-default notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;mfa&lt;/span&gt; &lt;span class="n"&gt;validate&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Data&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;speech&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;LibriSpeech&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;librispeech_mfa&lt;/span&gt; &lt;span class="n"&gt;english_us&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;txt&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;temp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;validate_temp&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;ignore_acoustics&lt;/span&gt;
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   So what this command will do is run through all of the files in the LibriSpeech folder (the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     librispeech_mfa
    &lt;/span&gt;
   &lt;/code&gt;
   folder in the command above is a
   &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/MFA-reorganization-scripts/blob/master/Librispeech/reorganize_librispeech.py"&gt;
    preprocessed
   &lt;/a&gt;
   version that uses the
   &lt;a class="reference external" href="https://montreal-forced-aligner.readthedocs.io/en/latest/data_format.html#prosodylab-aligner-format"&gt;
    Prosodylab format for MFA
   &lt;/a&gt;
   ), check for various issues like OOV words, errors reading the sound files, missing transcriptions, etc. The validator will generally also do a pass of generating the MFCC features and doing a quick monophone alignment to check for issues, but having the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     --ignore_acoustics
    &lt;/span&gt;
   &lt;/code&gt;
   flag skips this sequence to save time. The output of this command should be something like:
  &lt;/p&gt;
  &lt;div class="highlight-default notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;(aligner) user@hostname:/mnt/d/Data/speech/librispeech_ipa$ mfa validate /mnt/d/Data/speech/LibriSpeech/librispeech_mfa english_us.txt -t /mnt/d/temp/validate_temp --ignore_acoustics
/mnt/d/temp/validate_temp/librispeech_mfa/validate.log
INFO - Setting up corpus information...
INFO - Parsing dictionary without pronunciation probabilities without silence probabilities
INFO - Creating dictionary information...
INFO - Setting up training data...
Skipping acoustic feature generation
INFO -   ===============================Corpus===============================
292367 sound files
292367 sound files with .lab transcription files
0 sound files with TextGrids transcription files
0 additional sound files ignored (see below)
2484 speakers
292367 utterances
0.000 seconds total duration

DICTIONARY
----------
There were 55415 word types not found in the dictionary with a total of 271084 instances.
Please see/mnt/d/temp/validate_temp/librispeech_mfa/corpus_data/oovs_found.txtfor a full list of the word types and/mnt/d/temp/validate_temp/librispeech_mfa/corpus_data/utterance_oovs.txtfor a by-utterance breakdown of missing words.

SOUND FILE READ ERRORS
----------------------
There were no sound files that could not be read. There were no sound files that had unsupported bit depths.

FEATURE CALCULATION
-------------------
Acoustic feature generation was skipped.

FILES WITHOUT TRANSCRIPTIONS
----------------------------
There were no sound files missing transcriptions.

TRANSCRIPTIONS WITHOUT FILES
--------------------
There were no transcription files missing sound files.

TEXTGRID READ ERRORS
--------------------
There were no issues reading TextGrids.

UNREADABLE TEXT FILES
--------------------
There were no issues reading text files.Skipping test alignments.
INFO - All done!
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   In the temporary directory, MFA will output an
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     oovs_found.txt
    &lt;/span&gt;
   &lt;/code&gt;
   file (in this case,
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /mnt/d/temp/validate_temp/librispeech_mfa/corpus_data/oovs_found.txt
    &lt;/span&gt;
   &lt;/code&gt;
   ). This file will be a list of all words in the corpus that were not found in the dictionary, sorted by frequency in the corpus, so adding pronunciations for the initial entries is more important than adding entries for the words at the end that might only occur once or twice. You can see the exact frequencies for OOV words in the
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     oovs_count.txt
    &lt;/span&gt;
   &lt;/code&gt;
   file.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="perform-g2p"&gt;
  &lt;h2&gt;
   Perform G2P
   &lt;a class="headerlink" href="#perform-g2p" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   In the validation output above, there’s a lot of missing words (55,415 types and 271,084 tokens!). Generating pronunciations for all of these is going to take a long time, even with multiprocessing. In addition, at the start of bootstrapping, the data isn’t going to be as consistent as you might like. Some of the transformations I mentioned above were discovered only when I generated a pronunciation (and somehow got a trill /r/ as an output phone). The best process I’ve found is an iterative bootstrap approach, where I generate pronunciations for the most frequent 1,000 OOV words (this doesn’t take very long), add the vetted pronunciations to the dictionary and retrain as necessary.
  &lt;/p&gt;
  &lt;p&gt;
   The command I use to generate pronunciations for the subset file (
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     oovs_g2p.txt
    &lt;/span&gt;
   &lt;/code&gt;
   below) is:
  &lt;/p&gt;
  &lt;div class="highlight-default notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;mfa&lt;/span&gt; &lt;span class="n"&gt;g2p&lt;/span&gt; &lt;span class="n"&gt;english_us_ipa_g2p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;zip&lt;/span&gt; &lt;span class="n"&gt;to_g2p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;txt&lt;/span&gt; &lt;span class="n"&gt;oovs_g2p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;txt&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;num_jobs&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;num_pronunciations&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;temp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;g2p_temp&lt;/span&gt;
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   As with the training, I’m using 13 cores for generating these pronunciations (took about 10 minutes to process 1,500 words in the latest batch). The additional flag for
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     --num_pronunciations
    &lt;/span&gt;
   &lt;/code&gt;
   is set to 3, so for each word, the best 3 candidates will get returned. For transparent orthographies like Spanish, you probably don’t need to generate as many pronunciations, but for English it provides variable pronunciations in the output.
  &lt;/p&gt;
  &lt;p&gt;
   The output of the above command will be a file (
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     oovs_g2p.txt
    &lt;/span&gt;
   &lt;/code&gt;
   above) with contents like the following:
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Orthography
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head"&gt;
      &lt;p&gt;
       Pronunciation from G2P
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       paupers
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔ p ɚ z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       paupers
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɑ p ɚ z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       paupers
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔ p ɚ s
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       incarnate
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ɪ n k ɑ ɹ n ɪ t
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       incarnate
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ɪ n k ɑ ɹ n eɪ t
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       incarnate
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       ɪ n k ɑ ɹ n ə t
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       peerless
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɪ ɹ l ə s
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       peerless
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɪ ɹ l ɪ s
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       peerless
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɪ ɹ l ɛ s
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       perfumes
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɝ f j uː m z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       perfumes
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɚ f j uː m z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       perfumes
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ə ɹ f j uː m z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       persians
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɝ ʒ ə n z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       persians
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɝ ʒ n̩ z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       persians
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɝ ʃ n̩ z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       petrovna
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɛ t ɹ ə v n ə
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       petrovna
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɛ t ɹ oʊ v n ə
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       petrovna
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ə t ɹ ə v n ə
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       petted
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɛ t ɪ d
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       petted
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɛ t ə d
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       petted
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ə ʃ eɪ d
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ploughed
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p l aʊ d
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ploughed
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p l ʌ f t
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       ploughed
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p l ɑ f t
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       poisoning
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔɪ z ə n ɪ ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       poisoning
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔɪ z n ɪ ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       poisoning
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔɪ z n i ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       poring
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔː ɹ ɪ ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       poring
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔ ə ɹ ɪ ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       poring
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ə ɹ ɪ ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       portico
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔ ɹ t ə k oʊ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       portico
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔː ɹ t ə k oʊ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       portico
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɔː ɹ t i k oʊ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       pretends
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɹ ɪ t ɛ n d z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       pretends
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɹ iː t ɛ n d z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       pretends
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɹ ə t ɛ n d z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       prostrated
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɹ ɑ s t ɹ eɪ t ɪ d
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       prostrated
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɹ ə s t ɹ eɪ t ɪ d
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       prostrated
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ɹ ɑː s t ɹ eɪ t ɪ d
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       pulses
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ʌ l s ɪ z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       pulses
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ʌ l s iː z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       pulses
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       p ʌ l s i z
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       quickening
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       k w ɪ k ə n ɪ ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       quickening
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       k w ɪ k ɪ n ɪ ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       quickening
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       k w ɪ k ə n i ŋ
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       quietness
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       k w aɪ ə t n ə s
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td&gt;
      &lt;p&gt;
       quietness
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       k w aɪ ɪ t n ə s
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td&gt;
      &lt;p&gt;
       quietness
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td&gt;
      &lt;p&gt;
       k w aɪ ə t n ɪ s
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;p&gt;
   By generating three candidates, we are able to capture a number of sources of variability including dialect variation (
   &lt;em&gt;
    paupers
   &lt;/em&gt;
   as /p ɔ p ɚ z/ or /p ɑ p ɚ z/), different stress for different grammatical categories (adjective
   &lt;em&gt;
    incarnate
   &lt;/em&gt;
   as /ɪ n k ɑ ɹ n ɪ t/ and verb
   &lt;em&gt;
    incarnate
   &lt;/em&gt;
   as /ɪ n k ɑ ɹ n eɪ t/), and also just random orthography-phonology nonsense that English has (
   &lt;em&gt;
    ploughed
   &lt;/em&gt;
   in the list above has the first candidate as /p l aʊ d/, but really /p l ɑ f t/ isn’t a bad guess considering
   &lt;em&gt;
    coughed
   &lt;/em&gt;
   ). Again for languages with more straightforward orthography-phonology mappings, you could probably get away with just one candidate.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="update-dictionary-with-new-pronunciations"&gt;
  &lt;h2&gt;
   Update dictionary with new pronunciations
   &lt;a class="headerlink" href="#update-dictionary-with-new-pronunciations" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   For selecting candidates, I try to balance speed of adding entries with the following criteria:
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     including common dialectal variations (like both /ɔ/ and /ɑ/ in
     &lt;em&gt;
      caught
     &lt;/em&gt;
     -
     &lt;em&gt;
      cot
     &lt;/em&gt;
     merger words, though there may be some inconsistency on my part as I don’t have the distinction)
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     including unstressed vowel variation (
     &lt;em&gt;
      pronounce
     &lt;/em&gt;
     as /p ɹ ə n aʊ n s/ or /p ɹ oʊ n aʊ n s/)
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     some less common dialectal variation (like
     &lt;em&gt;
      news
     &lt;/em&gt;
     as /n uː z/ or /n j uː z/,
     &lt;em&gt;
      straw
     &lt;/em&gt;
     as /s t ɹ ɑ/ or /s tʃ ɹ ɑ/)
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     some phonetic variation, mostly around common deletions (
     &lt;em&gt;
      smouldering
     &lt;/em&gt;
     as /s m oʊ l d ə ɹ ɪ ŋ/ or /s m oʊ l d ɹ ɪ ŋ/)
    &lt;/p&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   But again, speed is the main criteria as there are a lot of missing words. The dictionary is available on GitHub
   &lt;a class="reference external" href="https://github.com/MontrealCorpusTools/mfa-models/blob/master/dictionary/english_us_ipa.dict"&gt;
    here
   &lt;/a&gt;
   . Feel free to download, take a look, and if you find any issues, feel free to create a pull request (or let me know).
  &lt;/p&gt;
  &lt;p&gt;
   The dictionary can be downloaded to use with MFA alignment with the command:
  &lt;/p&gt;
  &lt;div class="highlight-default notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;mfa&lt;/span&gt; &lt;span class="n"&gt;download&lt;/span&gt; &lt;span class="n"&gt;dictionary&lt;/span&gt; &lt;span class="n"&gt;english_us_ipa&lt;/span&gt;
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;
   and the G2P model with the command:
  &lt;/p&gt;
  &lt;div class="highlight-default notranslate"&gt;
   &lt;div class="highlight"&gt;
    &lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;mfa&lt;/span&gt; &lt;span class="n"&gt;download&lt;/span&gt; &lt;span class="n"&gt;g2p&lt;/span&gt; &lt;span class="n"&gt;english_us_ipa_g2p&lt;/span&gt;
&lt;/pre&gt;
   &lt;/div&gt;
  &lt;/div&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="final-thoughts"&gt;
 &lt;h1&gt;
  Final thoughts
  &lt;a class="headerlink" href="#final-thoughts" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  I hope this is useful as both a tutorial and a starting point for using IPA in English alignment. The eventual goal of my tinkering with this is to include a bunch of corpora together and create an IPA-based acoustic model to use with any language that has a dictionary in IPA. Of course, I think that’s still a bit of a pipe dream given variation in IPA, but the hope is that with the phone clustering under the hood for triphones in Kaldi, along with speaker-adaptation and other feature transformations, we might be able to get relatively good performance.
 &lt;/p&gt;
 &lt;p&gt;
  I have some thoughts and opinions on having an IPA parser inside of MFA that takes out some diacritics so that phonesets are more comparable:
 &lt;/p&gt;
 &lt;ul class="simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    length markers could be internally discarded, and then added back when creating TextGrids
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    diphthongs and affricates could be split up internally so that you’re not reliant on a single language providing data for something like /tʂ/, and could instead leverage other language data more straightforwardly for /ʂ/
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    stripping out tone marking since it’s a segmental alignment (particularly cases where it’s a separate symbol in the transcription)
   &lt;/p&gt;
  &lt;/li&gt;
 &lt;/ul&gt;
 &lt;p&gt;
  I’m planning on doing more of these blog posts for other languages (and most of them I don’t speak, so I’ll need some feedback on what makes sense and what doesn’t for those). I’m hoping also that the dictionary in this post can be a bit of a living resource as I and hopefully others update it, but at the very least I hope this is useful as a tutorial on using MFA’s G2P functionality to bootstrap and speed up dictionary development.
 &lt;/p&gt;
&lt;/section&gt;</content><category term="Blog"></category><category term="mfa"></category><category term="g2p"></category><category term="tutorial"></category></entry><entry><title>How to create synthetic speech continua using STRAIGHT</title><link href="https://memcauliffe.com/how-to-create-synthetic-speech-continua-using-straight.html" rel="alternate"></link><published>2017-02-23T00:00:00-08:00</published><updated>2017-02-23T00:00:00-08:00</updated><author><name>Michael McAuliffe</name></author><id>tag:memcauliffe.com,2017-02-23:/how-to-create-synthetic-speech-continua-using-straight.html</id><summary type="html">&lt;p&gt;
 STRAIGHT is a program that analyzes speech, decomposes it into source and filter characteristics, and then recombines it after some manipulation or interpolation. This tutorial is more of a practical guide for using STRAIGHT to create various synthetic speech
&lt;/p&gt;</summary><content type="html">&lt;p&gt;
 [TOC]
&lt;/p&gt;



&lt;section id="overview"&gt;
 &lt;h1&gt;
  Overview
  &lt;a class="headerlink" href="#overview" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;section id="what-is-straight"&gt;
  &lt;h2&gt;
   What is STRAIGHT?
   &lt;a class="headerlink" href="#what-is-straight" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   STRAIGHT is a program that analyzes speech, decomposes it into source and
filter characteristics, and then recombines it after some manipulation or interpolation.
  &lt;/p&gt;
  &lt;p&gt;
   This tutorial is more of a pratical guide for using STRAIGHT to create various
synthetic speech.  More detailed information and publications about STRAIGHT
are available
   &lt;a class="reference external" href="http://www.wakayama-u.ac.jp/~kawahara/STRAIGHTadv/index_e.html"&gt;
    on the official website
   &lt;/a&gt;
   .
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="what-is-straight-good-for"&gt;
  &lt;h2&gt;
   What is STRAIGHT good for?
   &lt;a class="headerlink" href="#what-is-straight-good-for" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   STRAIGHT is best used for creating continua between two naturally-produced endpoints.
This allows for holistic morphing between the two, rather than just mixing
one part of the sound file, so aspects of coarticulation can be better preserved. Alignment
between sound files is both temporal in the waveform and also in the frequency
domain, allowing for peaks in the spectra to be shifted around, rather than
just mixed linearly.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="what-is-straight-not-good-for"&gt;
  &lt;h2&gt;
   What is STRAIGHT not good for?
   &lt;a class="headerlink" href="#what-is-straight-not-good-for" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     Parametric synthesis
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       Can’t specify formant values
      &lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       Can’t specify values for manipulation precisely (click and drag interface)
      &lt;/p&gt;
      &lt;ul&gt;
       &lt;li&gt;
        &lt;p&gt;
         At least in the GUI (Matlab source has greater control, but less user-friendly)
        &lt;/p&gt;
       &lt;/li&gt;
      &lt;/ul&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Articulatory synthesis
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Transient acoustic event synthesis
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       Waveform gets averaged out, stops don’t have as strong of bursts
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Non-speech synthesis
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       Explicitly assumes source-filter approach
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="straight-basics"&gt;
 &lt;h1&gt;
  STRAIGHT Basics
  &lt;a class="headerlink" href="#straight-basics" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  Synthesis using STRAIGHT involves analyzing a wav file of naturally produced
speech and then resynthsizing a new wav file.
 &lt;/p&gt;
 &lt;p&gt;
  There are three major components involved that are covered in depth:
 &lt;/p&gt;
 &lt;ul class="simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="#analysis"&gt;
     Wav file analysis
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="#morphing"&gt;
     Morphing
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="#manipulation"&gt;
     Manipulation
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/li&gt;
 &lt;/ul&gt;
 &lt;p&gt;
  The workflow that I’ve found works best to do all the analysis of wav files
first, save the output of each file (preferrably in a backed up location,
i.e. Dropbox folder) before doing any morphing.  You can do the analysis to continuum
for each recorded end point, but I find this slower overall.
 &lt;/p&gt;
 &lt;p&gt;
  One important thing to note is how dialogs interact with each other.  In general,
the changes you do in one dialog (i.e., analysis or anchoring) will not be
transferred to the main dialog (Morphing Menu, for instance) unless a specific button is
pressed (“Set up anchors” or “Finish/Upload” or “Update frequency anchors”).
I tend to recommend that the output of each step be saved to a mat file, and then
loaded in the main dialog, just so that intermediate steps get saved and so that you’re sure
the main dialog has the correct data.
 &lt;/p&gt;
 &lt;section id="analysis"&gt;
  &lt;h2&gt;
   Analysis
   &lt;a class="headerlink" href="#analysis" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   There are three steps to analyze a file,
which involve separating a waveform into source and filter characteristics.
Source and filter can then be manipulated separately and recombined in the final
synthesis.
  &lt;/p&gt;
  &lt;ol class="arabic simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="#f0-structure-extraction"&gt;
      F0/F0 structure extraction
     &lt;/a&gt;
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="#aperiodicity-extraction"&gt;
      Aperiodicity extraction
     &lt;/a&gt;
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="#straight-spectrum"&gt;
      STRAIGHT spectrum
     &lt;/a&gt;
    &lt;/p&gt;
   &lt;/li&gt;
  &lt;/ol&gt;
  &lt;p&gt;
   Analysis can be done either from the MorphingMenu program, or from the
TandemSTRAIGHTHandler program.  I recommend doing the analysis of all sound
files in one big batch through the TandemSTRAIGHTHandler program, save the results
as .mat files, and then load those .mat files as needed in the MorphingMenu
to create continua.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="f0-f0-structure-extraction"&gt;
  &lt;h2&gt;
   F0/F0 structure extraction
   &lt;a class="headerlink" href="#f0-f0-structure-extraction" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   This step extracts the voiced source characteristics of the signal, for all voiced
segments in a file.  To begin extracting the F0 structure, press the “F0/F0 structure extraction”
button to open the F0 extraction dialog.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Initial display" src="https://memcauliffe.com/images/straight_tutorial/init.png"/&gt;
   {: .center-image }
The following screen shot is for the
   &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_initialstress.wav"&gt;
    asi_initialstress.wav
   &lt;/a&gt;
   file.  You’ll notice in the waveform at the bottom of the dialog that there are two vowel portions, a glottal stop at the
beginning, and an sibiliant between the vowels.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Beginning of F0 extraction" src="https://memcauliffe.com/images/straight_tutorial/f0_extract_1.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   The first step is press the “Calculate” button to generate an initial pitch track
and voiced/unvoiced regions of the waveform.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="After initial calculation" src="https://memcauliffe.com/images/straight_tutorial/f0_extract_2.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   This pitch track is generally pretty good, but clearly has some issues in
silent and unvoiced sections. Likewise, there’s a few errors in which frames
are voiced versus unvoiced, namely with missing voiced frames in the middle
of vowels.
  &lt;/p&gt;
  &lt;p&gt;
   The next step is to apply “Auto tracking” to clean up the pitch track.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="After auto tracking" src="https://memcauliffe.com/images/straight_tutorial/f0_extract_3.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   The pitch contour is now much cleaner, and the missing voiced frames in
the middle of vowels are now there. However, extra voiced frames are now
present in the middle of the sibilant, which should be corrected manually.
  &lt;/p&gt;
  &lt;p&gt;
   To change voicing regions, you can click the edge of a voiced region and
drag it around.  To delete these regions, I find it easiest to drag one of
the voiced regions from the vowel over the erroneous regions, and then
drag it back to where it should be.  You can also click the right side of
a voiced interval, and drag it all the way to the left side of it, which will remove it as well.
Also, refer to the
   &lt;a class="reference external" href="#f0_interface"&gt;
    F0 extraction interface page
   &lt;/a&gt;
   for more information about interacting with the dialog.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="After manual clean up" src="https://memcauliffe.com/images/straight_tutorial/f0_extract_4.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   Once you’re happy with the voiced/unvoiced parts of the file, press the
“Finish/upload” button to send what you’ve done back to the main analysis
window.
  &lt;/p&gt;
  &lt;section id="aperiodicity-extraction"&gt;
   &lt;h3&gt;
    Aperiodicity extraction
    &lt;a class="headerlink" href="#aperiodicity-extraction" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
   &lt;p&gt;
    Aperiodic portions of the signal are extracted and analyzed.  Aperiodic portions
are usually obstruents, but it can also (unintentionally) model noise in the recording.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Aperiodic extraction" src="https://memcauliffe.com/images/straight_tutorial/aperiodic.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    This is simple from the user’s point of view, no extra dialog is opened or extra input needed.
   &lt;/p&gt;
  &lt;/section&gt;
  &lt;section id="straight-spectrum"&gt;
   &lt;h3&gt;
    STRAIGHT spectrum
    &lt;a class="headerlink" href="#straight-spectrum" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
   &lt;p&gt;
    This step extracts the filter characteristics of the signal.  This is similar
to an LPC spectrum or a power spectrum lacking source information like harmonics
or noise sources.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="STRAIGHT spectrum extraction" src="https://memcauliffe.com/images/straight_tutorial/straight_spectrum.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    Like the aperiodicity extraction, no extra dialog is opened when calculating the spectrum.
   &lt;/p&gt;
   &lt;p&gt;
    Once a waveform has been fully analyzed, it is ready to be manipulated and resynthesized
or morphed with another analyzed sound file to create a continuum.
   &lt;/p&gt;
   &lt;p&gt;
    The most common use case is to create a continuum via morphing.
   &lt;/p&gt;
  &lt;/section&gt;
 &lt;/section&gt;
 &lt;section id="morphing"&gt;
  &lt;h2&gt;
   Morphing
   &lt;a class="headerlink" href="#morphing" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The most common way to use STRAIGHT in speech perception experiments
is to morph between two similar sound files that differ in a key way.
  &lt;/p&gt;
  &lt;p&gt;
   In this page, we’ll morph between asi (
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /'ɑsi/
    &lt;/span&gt;
   &lt;/code&gt;
   ) and ashi (
   &lt;code class="docutils literal notranslate"&gt;
    &lt;span class="pre"&gt;
     /'ɑʃi/
    &lt;/span&gt;
   &lt;/code&gt;
   ) with stress on the initial
syllable.  The wav files are
   &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_initialstress.wav"&gt;
    asi_initialstress.wav
   &lt;/a&gt;
   and
   &lt;a class="reference external" href="https://memcauliffe.com/wav/ashi_initialstress.wav"&gt;
    ashi_initialstress.wav
   &lt;/a&gt;
   , and the pre-analyzed
mat files are
   &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjasi_initialstress.mat"&gt;
    StrObjasi_initialstress.mat
   &lt;/a&gt;
   and
   &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjashi_initialstress.mat"&gt;
    StrObjashi_initialstress.mat
   &lt;/a&gt;
   .
  &lt;/p&gt;
  &lt;p&gt;
   Load these files into the morphing menu, either as the mat files, or analyze
the wav files.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Load/analyze sound files" src="https://memcauliffe.com/images/straight_tutorial/morphing_load.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   There are three steps to creating a continuum:
  &lt;/p&gt;
  &lt;ol class="arabic simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="#alignment-of-the-two-files"&gt;
      Alignment of the two files
     &lt;/a&gt;
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="#setting-up-morphing-rate"&gt;
      Setting up morphing rate
     &lt;/a&gt;
    &lt;/p&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="#generating-the-continuum"&gt;
      Generating the continuum
     &lt;/a&gt;
    &lt;/p&gt;
   &lt;/li&gt;
  &lt;/ol&gt;
  &lt;section id="alignment-of-the-two-files"&gt;
   &lt;h3&gt;
    Alignment of the two files
    &lt;a class="headerlink" href="#alignment-of-the-two-files" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
   &lt;p&gt;
    To begin with, once the sound files are loaded and analyzed, press the “Open anchoring
interface” button to specify the alignment between the two. For details on how to perform various actions in the anchoring
interface, please see
    &lt;a class="reference external" href="#anchoring_interface"&gt;
     here
    &lt;/a&gt;
    .
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Open anchoring interface" src="https://memcauliffe.com/images/straight_tutorial/morphing_anchoring.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    This will open a window with the two waveforms and spectrograms (asi on
top as “Speaker A” and ashi on bottom as “Speaker B”).
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Initial anchoring interface" src="https://memcauliffe.com/images/straight_tutorial/morphing_init.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    Next, click on the “Calculate distance matrix” button, which will compare
each frame of audio from one file to each frame in the other.
   &lt;/p&gt;
   &lt;p&gt;
    In the distance matrix on the right side, dark blue represents small distances
(very similar frames of audio) and dark red represents large distances (very different
frames of audio).  In general, you’ll notice stripe or checkboard patterns,
and the boundaries of these stripes correspond roughly to segment boundaries.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Distance matrix calculated" src="https://memcauliffe.com/images/straight_tutorial/morphing_matrix.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    The initial alignment is the straight line across the two files. In general,
this should be pretty close to the path we’ll eventually choose, because we
want the sound files we’re morphing to be as similar as possible.  In this
case, I’ve produced the sounds with the same stress pattern and similar timings,
though /s/ in general tends to be longer than /ʃ/.
   &lt;/p&gt;
   &lt;p&gt;
    The temporal anchors should be placed such that they line up to points in
the sound file that have the same “meaning” in both files.  So minimally there should
be an anchor for the onset of the /ɑ/, the boundary between the /ɑ/ and the
sibilant, the boundary between the sibilant and the /i/, and the offset of
the /i/.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Anchors for temporal relations" src="https://memcauliffe.com/images/straight_tutorial/morphing_temporal.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    We also want to make sure that there are frequency anchors for
the sibilant and the formant transitions, to make those more natural.
Without frequency anchors, any differences will be mixed linearly in the
frequency domain, similar to what you would get if you made the stimuli in
Praat by extracting the /s/ and /ʃ/ and mixing them at different percentages.
Instead we can shift the spectral peak around in STRAIGHT.  The differences
between mixing and shifting are not super pronounced when synthesizing
sibilant continua, but make a huge difference in synthesizing vowel continua
(shifting formants around).
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Anchors with extra for frequency anchoring" src="https://memcauliffe.com/images/straight_tutorial/morphing_temporal_frequency.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    Once you have an anchor in the middle of the sound to be morphed, we want
to anchor the peaks in the frequency domain.  To do so, hold alt and click
on the point in the center of the sibilants (the cursor will turn to a pointing
hand over the anchor).  This will bring up a display of the spectra for the
two wave files at that point in time.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Frequency anchoring" src="https://memcauliffe.com/images/straight_tutorial/morphing_frequency_anchors.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    In this case we’ve aligned the peaks of the sibilants, so that they’ll get
shifted around when morphing, rather than averaged.  See the
    &lt;a class="reference external" href="#frequency-anchor-interface-controls"&gt;
     interface controls page
    &lt;/a&gt;
    for more details on how to interact with frequency anchors.
   &lt;/p&gt;
   &lt;p&gt;
    Once you’re happy with the frequency anchors, press the “Update frequency anchors”
button in the lower right of the window, and that will save what you have anchored
and pass it back to the main anchoring dialog.
   &lt;/p&gt;
   &lt;p&gt;
    Once all the anchors are set up to your satisfaction, you can press the “Set up anchors”
button to send the work back to the main morphing dialog.  I also recommend saving the anchors
via the “Save morphing substrate” button, like the
    &lt;a class="reference external" href="https://memcauliffe.com/mat/asi-ashi_initialstress.mat"&gt;
     asi-ashi_initialstress.mat
    &lt;/a&gt;
    file.
   &lt;/p&gt;
  &lt;/section&gt;
  &lt;section id="setting-up-morphing-rate"&gt;
   &lt;h3&gt;
    Setting up morphing rate
    &lt;a class="headerlink" href="#setting-up-morphing-rate" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
   &lt;p&gt;
    Once anchoring is finished, or the morphing substrate mat file from a previous session
is loaded, you’ll have to set up the two end points of the continuum you want to generate.
   &lt;/p&gt;
   &lt;p&gt;
    To do so, first press the “Initialize morphing rate” button and then the
“Edit morphing rate” button, which will open the morphing rate dialog.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Initializing morphing rate" src="https://memcauliffe.com/images/straight_tutorial/morphing_rate_init.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    In the dialog window, there are a lot of options for what can be done.
For the continuum we’re creating, we’re going to be ignoring most everything
here, but see the
    &lt;a class="reference external" href="#morphing_rate_interface"&gt;
     morphing rate interface page
    &lt;/a&gt;
    for more details on what aspects of it do.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Morphing rate dialog initial state" src="https://memcauliffe.com/images/straight_tutorial/morphing_rate_begin.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    What we want to do is create a substrate that is wholly “A” (i.e. asi)
and another substrate that is wholly “B” (i.e. ashi). To do so, click on
one of the points in the “Spec” figure (the blue boxes and lines should turn green) and drag it
all the way up to the “A” side.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Morphing rate dialog for A substrate" src="https://memcauliffe.com/images/straight_tutorial/morphing_rate_A.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    Once that’s done, press the “Set up morphing rate” button on the right to
send it back to the main dialog. Click the “Save morphing substrate” button
to save the A subtrate as a mat file, like
    &lt;a class="reference external" href="https://memcauliffe.com/mat/asi-ashi_initialstress_A.mat"&gt;
     asi-ashi_initialstress_A.mat
    &lt;/a&gt;
    .
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Saving morphing rate A substrate" src="https://memcauliffe.com/images/straight_tutorial/morphing_rate_save_A.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    Once the A substrate is saved, we’ll make the B substrate by clicking the
“Edit morphing rate” button, and then clicking and dragging a point in the
“Spec” figure (along with all the rest of the points) all the way to the B
side.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Morphing rate dialog for B substrate" src="https://memcauliffe.com/images/straight_tutorial/morphing_rate_B.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    Once more, click the “Set up morphing rate” button to send it back to the
main morphing window, and then click the “Save morphing substrate” button
to save the B subtrate as a mat file, like
    &lt;a class="reference external" href="https://memcauliffe.com/mat/asi-ashi_initialstress_B.mat"&gt;
     asi-ashi_initialstress_B.mat
    &lt;/a&gt;
    .
   &lt;/p&gt;
  &lt;/section&gt;
  &lt;section id="generating-the-continuum"&gt;
   &lt;h3&gt;
    Generating the continuum
    &lt;a class="headerlink" href="#generating-the-continuum" title="Link to this heading"&gt;
     ¶
    &lt;/a&gt;
   &lt;/h3&gt;
   &lt;p&gt;
    Once the end points of the continuum are all set up, we’re ready to generate
the steps.  From the main morphing menu, click the “Continuum” button at the
bottom right of the menu.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Generate continuum" src="https://memcauliffe.com/images/straight_tutorial/continuum_init.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    This brings up a dialog to generate the continuum.  You can edit where the
continuum will be save here, but I find it easier just to use the defaults
and move the continuum to a backed up location once you’re happy with the
results.  You might have to go back and edit the anchors a couple of times
and STRAIGHT is not good about remembering paths you’ve entered before.
You can also change the number of the steps that will be generated if you
want more or less than the default 11.  I do recommend changing the file name root
to something more informative than “stimulus”, in this case I used “asi-ashi_initialstress”.
   &lt;/p&gt;
   &lt;p&gt;
    &lt;img alt="Generate continuum dialog" src="https://memcauliffe.com/images/straight_tutorial/continuum_dialog.png"/&gt;
    {: .center-image }
   &lt;/p&gt;
   &lt;p&gt;
    When you click the “Generate continuum” button, it will prompt you to find
the A substrate mat file that we saved earlier, followed by the B substrate mat
file.  Once both have been selected, it will generate the continuum (and play
them on top of each other).  To actually get a sense of how well they turned
out, I would recommend opening them in Praat and playing around with them
there. The continuum steps that I’ve generated is below.
   &lt;/p&gt;
   &lt;table class="docutils align-default"&gt;
    &lt;thead&gt;
     &lt;tr class="row-odd"&gt;
      &lt;th class="head text-center"&gt;
       &lt;p&gt;
        Step
       &lt;/p&gt;
      &lt;/th&gt;
      &lt;th class="head text-center"&gt;
       &lt;p&gt;
        File
       &lt;/p&gt;
      &lt;/th&gt;
      &lt;th class="head text-center"&gt;
       &lt;p&gt;
        Step
       &lt;/p&gt;
      &lt;/th&gt;
      &lt;th class="head text-center"&gt;
       &lt;p&gt;
        File
       &lt;/p&gt;
      &lt;/th&gt;
      &lt;th class="head text-center"&gt;
       &lt;p&gt;
        Step
       &lt;/p&gt;
      &lt;/th&gt;
      &lt;th class="head text-center"&gt;
       &lt;p&gt;
        File
       &lt;/p&gt;
      &lt;/th&gt;
     &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
     &lt;tr class="row-even"&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        1
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress001.wav"&gt;
         asi-ashi_initialstress001.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        2
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress002.wav"&gt;
         asi-ashi_initialstress002.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        3
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress003.wav"&gt;
         asi-ashi_initialstress003.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr class="row-odd"&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        4
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress004.wav"&gt;
         asi-ashi_initialstress004.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        5
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress005.wav"&gt;
         asi-ashi_initialstress005.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        6
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress006.wav"&gt;
         asi-ashi_initialstress006.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr class="row-even"&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        7
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress007.wav"&gt;
         asi-ashi_initialstress007.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        8
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress008.wav"&gt;
         asi-ashi_initialstress008.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        9
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress009.wav"&gt;
         asi-ashi_initialstress009.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr class="row-odd"&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        10
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress010.wav"&gt;
         asi-ashi_initialstress010.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        11
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
        &lt;a class="reference external" href="https://memcauliffe.com/wav/asi-ashi_initialstress011.wav"&gt;
         asi-ashi_initialstress011.wav
        &lt;/a&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
       &lt;/p&gt;
      &lt;/td&gt;
      &lt;td class="text-center"&gt;
       &lt;p&gt;
       &lt;/p&gt;
      &lt;/td&gt;
     &lt;/tr&gt;
    &lt;/tbody&gt;
   &lt;/table&gt;
   &lt;p&gt;
    I’ve written a batch script in Matlab for generating lots of continua given a folder
with *A.mat and corresponding *B.mat substrates.  If you’re generating
a lot of continua, this might be faster and more flexible than using the dialog for each one.
The script is available
    &lt;a class="reference external" href="https://github.com/SpeechInContext/linguistic-analysis-resources/blob/master/continua/morphing/morph_continua.m"&gt;
     here
    &lt;/a&gt;
   &lt;/p&gt;
  &lt;/section&gt;
 &lt;/section&gt;
 &lt;section id="manipulation"&gt;
  &lt;h2&gt;
   Manipulation
   &lt;a class="headerlink" href="#manipulation" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The manipulation dialog is accessed through the TandemSTRAIGHTHandler program,
rather than the morphing menu.  Near the bottom after analyzing a sound file
or loading a pre-analyzed sound file, you can click the “Open manipulation GUI”
to manipulate a given sound file.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Initial main dialog" src="https://memcauliffe.com/images/straight_tutorial/manipulation_init.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   When you load into the dialog, it shows you the spectrogram along with figures
for intensity, F0, size ratio, duration ratio, and AP ratio.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Initial dialog state" src="https://memcauliffe.com/images/straight_tutorial/manipulation_begin.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   From here you can use the pen tool to draw contours and patterns for something
like F0 or intensity.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="New pitch contour" src="https://memcauliffe.com/images/straight_tutorial/manipulation_new_contour.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   You can also use a rectangle selector (selected via
the radio buttons on the right side of the interface. If you want to make
the first word longer by some amount, you can select all the points and then
raise their duration ratio.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Manipulated duration" src="https://memcauliffe.com/images/straight_tutorial/manipulation_duration_selection.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   To generate the synthesized wave file, press the “Synthesize” button to hear
what the current manipulation sounds like.  When you’re happy with the synthesis,
press the “Save results” button to save a .mat file and a wav file. The save
box makes it seems like only a .mat file will be saved, but a wav file with
the same name will be saved in the same place.
  &lt;/p&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="examples"&gt;
 &lt;h1&gt;
  Examples
  &lt;a class="headerlink" href="#examples" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  This section contains a number of examples demonstrating the use of STRAIGHT
to generate continua between end points, or resynthesize a single file.
 &lt;/p&gt;
 &lt;ul class="simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    Sibilant continua
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      Similar to the walkthrough
     &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;p&gt;
      More endpoint examples
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Stress shift continua
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      /’ɑsi/ to /ɑ’si/
     &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;p&gt;
      /’ɑʃi/ to /ɑ’ʃi/
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Stop voicing continua
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      “task” /tæsk/ to “dask” /dæsk/
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Vowel continua
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      “bit” /bɪt/ to “bat” /bæt/
     &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;p&gt;
      Other bVt words to play around with
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Intonation continua
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      “My dog ate my homework.” (declaritive) to “My dog ate my homework?” (yes-no)
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Pitch manipulation
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      “My dog ate my homework?” to user-specified declaritive intonation
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
 &lt;/ul&gt;
&lt;/section&gt;



&lt;section id="synthesizing-a-sibilant-continuum"&gt;
 &lt;h1&gt;
  Synthesizing a sibilant continuum
  &lt;a class="headerlink" href="#synthesizing-a-sibilant-continuum" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  This kind of continuum is covered in depth in the
  &lt;a class="reference external" href="#morphing.html"&gt;
   morphing tutorial
  &lt;/a&gt;
  .
 &lt;/p&gt;
 &lt;p&gt;
  If you would like to synthesize other similar continua, I have the following
wav/mat files available:
 &lt;/p&gt;
 &lt;ul class="simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_initialstress.wav"&gt;
     asi_initialstress.wav
    &lt;/a&gt;
    -
    &lt;a class="reference external" href="https://memcauliffe.com/wav/ashi_initialstress.wav"&gt;
     ashi_initialstress.wav
    &lt;/a&gt;
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjasi_initialstress.mat"&gt;
       StrObjasi_initialstress.mat
      &lt;/a&gt;
      -
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjashi_initialstress.mat"&gt;
       StrObjashi_initialstress.mat
      &lt;/a&gt;
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_finalstress.wav"&gt;
     asi_finalstress.wav
    &lt;/a&gt;
    -
    &lt;a class="reference external" href="https://memcauliffe.com/wav/ashi_finalstress.wav"&gt;
     ashi_finalstress.wav
    &lt;/a&gt;
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjasi_finalstress.mat"&gt;
       StrObjasi_finalstress.mat
      &lt;/a&gt;
      -
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjashi_finalstress.mat"&gt;
       StrObjashi_finalstress.mat
      &lt;/a&gt;
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_finalstress.wav"&gt;
     asi_finalstress.wav
    &lt;/a&gt;
    -
    &lt;a class="reference external" href="https://memcauliffe.com/wav/ashi_bad.wav"&gt;
     ashi_bad.wav
    &lt;/a&gt;
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjasi_finalstress.mat"&gt;
       StrObjasi_finalstress.mat
      &lt;/a&gt;
      -
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjashi_bad.mat"&gt;
       StrObjashi_bad.mat
      &lt;/a&gt;
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_bad.wav"&gt;
     asi_bad.wav
    &lt;/a&gt;
    -
    &lt;a class="reference external" href="https://memcauliffe.com/wav/ashi_finalstress.wav"&gt;
     ashi_finalstress.wav
    &lt;/a&gt;
   &lt;/p&gt;
   &lt;ul&gt;
    &lt;li&gt;
     &lt;p&gt;
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjasi_bad.mat"&gt;
       StrObjasi_bad.mat
      &lt;/a&gt;
      -
      &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjashi_finalstress.mat"&gt;
       StrObjashi_finalstress.mat
      &lt;/a&gt;
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
 &lt;/ul&gt;
 &lt;p&gt;
  The _bad versions are cases where I produced the word with final stress,
but with a fairly reduced /ɑ/.  The morphing of those would be one instance
where it would probably be better to rerecord rather than morph as is, but
are provided as examples for teaching.
 &lt;/p&gt;
 &lt;section id="synthesizing-a-stress-shift-continuum"&gt;
  &lt;h2&gt;
   Synthesizing a stress shift continuum
   &lt;a class="headerlink" href="#synthesizing-a-stress-shift-continuum" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The continuum for stress shift can be generated using the same files as the sibilant continua,
because each token was produced with stress either on the initial syllable
or the final syllable.
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_initialstress.wav"&gt;
      asi_initialstress.wav
     &lt;/a&gt;
     -
     &lt;a class="reference external" href="https://memcauliffe.com/wav/asi_finalstress.wav"&gt;
      asi_finalstress.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjasi_initialstress.mat"&gt;
        StrObjasi_initialstress.mat
       &lt;/a&gt;
       -
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjasi_finalstress.mat"&gt;
        StrObjasi_finalstress.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/ashi_initialstress.wav"&gt;
      ashi_initialstress.wav
     &lt;/a&gt;
     -
     &lt;a class="reference external" href="https://memcauliffe.com/wav/ashi_finalstress.wav"&gt;
      ashi_finalstress.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjashi_initialstress.mat"&gt;
        StrObjashi_initialstress.mat
       &lt;/a&gt;
       -
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjashi_finalstress.mat"&gt;
        StrObjashi_finalstress.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   In this example, we’ll be morphing asi_initialstress.wav to asi_finalstress.wav.
  &lt;/p&gt;
  &lt;p&gt;
   Below you’ll see the temporal anchors for the morphing.  You’ll notice that
there are relatively large deviations in opposite directions of a straight line across
for where the stressed syllable is, due to duration being a large cue to stress in English.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Temporal anchors" src="https://memcauliffe.com/images/straight_tutorial/stress_anchors.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   There is also some spectral differences in the second syllable, due
to the effect of stress.  As such, we’d like to make sure that formants
are properly aligned during the second syllable as below.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Frequency anchors" src="https://memcauliffe.com/images/straight_tutorial/stress_frequency_anchors.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   Below you’ll find the full morphed continuum from initial to final stress on “asi”.
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       1
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi001.wav"&gt;
        initial-final_asi001.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       2
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi002.wav"&gt;
        initial-final_asi002.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       3
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi003.wav"&gt;
        initial-final_asi003.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       4
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi004.wav"&gt;
        initial-final_asi004.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       5
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi005.wav"&gt;
        initial-final_asi005.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       6
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi006.wav"&gt;
        initial-final_asi006.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       7
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi007.wav"&gt;
        initial-final_asi007.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       8
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi008.wav"&gt;
        initial-final_asi008.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       9
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi009.wav"&gt;
        initial-final_asi009.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       10
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi010.wav"&gt;
        initial-final_asi010.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       11
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/initial-final_asi011.wav"&gt;
        initial-final_asi011.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
 &lt;/section&gt;
 &lt;section id="synthesizing-a-voicing-continuum"&gt;
  &lt;h2&gt;
   Synthesizing a voicing continuum
   &lt;a class="headerlink" href="#synthesizing-a-voicing-continuum" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   This page focuses on making a continuum between “task” and “dask”.  Below
you’ll find the wav files used, as well as a prevoiced version of “dask”,
for if you’d like to play around with it.
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/task.wav"&gt;
      task.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjtask.mat"&gt;
        StrObjtask.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/dask.wav"&gt;
      dask.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjdask.mat"&gt;
        StrObjdask.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/dask_prevoiced.wav"&gt;
      dask_prevoiced.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjdask_prevoiced.mat"&gt;
        StrObjdask_prevoiced.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   You’ll see below the temporal anchors for the morphing substrate. The main
focus of the anchors is around when the burst and aspiration occur, so
anchors have been placed at various points: before the burst, after the burst,
when voicing begins, and when formant transitions are complete.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Temporal anchors" src="https://memcauliffe.com/images/straight_tutorial/voicing_anchors.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   It could be argued that rather than placing a boundary where voicing begins,
that boundary should be placed relative to the formant transitions.  In “dask”,
that aligns with voicing, but in “task” formant transitions begin during the
aspiration.  This would result in a continua centered around the source going from
aperiodic to periodic, rather than the duration of the aperiodic aspiration.
I’m going to leave this as a task to you if you’re interested in comparing the resulting
continua.  It should be less natural, because the amplitude of prevoicing would weaken as
the VOT gets shorter, which doesn’t make sense from an articulatory standpoint. A potentially
better way would be to create two continua next to one another, one from aspirated
to unaspirated and then from unaspirated to prevoiced.
  &lt;/p&gt;
  &lt;p&gt;
   Below you’ll find the full morphed continuum from aspirated “task” to unaspirated “dask”.
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       1
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask001.wav"&gt;
        task-dask001.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       2
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask002.wav"&gt;
        task-dask002.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       3
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask003.wav"&gt;
        task-dask003.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       4
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask004.wav"&gt;
        task-dask004.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       5
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask005.wav"&gt;
        task-dask005.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       6
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask006.wav"&gt;
        task-dask006.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       7
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask007.wav"&gt;
        task-dask007.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       8
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask008.wav"&gt;
        task-dask008.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       9
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask009.wav"&gt;
        task-dask009.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       10
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask010.wav"&gt;
        task-dask010.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       11
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/task-dask011.wav"&gt;
        task-dask011.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;p&gt;
   One thing to note, is that due to the way STRAIGHT does its synthesis,
quick transients like stop bursts can get weakened compared to their
original form.  If we look at the natural stop burst for “task”, we see
that it is higher in amplitude than the following aspiration.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Natural stop burst" src="https://memcauliffe.com/images/straight_tutorial/voicing_task_natural.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   However, the same cannot be said for the synthesized version, where the
burst amplitude has been reduced and is comparable to the aspiration amplitude.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Synthesized stop burst" src="https://memcauliffe.com/images/straight_tutorial/voicing_task_synthesized.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   In general, while STRAIGHT excels at modelling continous sources like voicing
and turbulence, it’s not as good at modelling transient sources like bursts.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="synthesizing-a-vowel-continuum"&gt;
  &lt;h2&gt;
   Synthesizing a vowel continuum
   &lt;a class="headerlink" href="#synthesizing-a-vowel-continuum" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   This page will focus on making a continuum between “bit” and “bat”, primarily to
illustrate the benefits of frequency anchoring. However, I have
many /bVt/ words recorded that can be used as end points for many different
continua around the English vowel space:
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/bait.wav"&gt;
      bait.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbait.mat"&gt;
        StrObjbait.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/bat.wav"&gt;
      bat.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbat.mat"&gt;
        StrObjbat.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/beet.wav"&gt;
      beet.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbeet.mat"&gt;
        StrObjbeet.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/bet.wav"&gt;
      bet.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbet.mat"&gt;
        StrObjbet.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/bit.wav"&gt;
      bit.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbit.mat"&gt;
        StrObjbit.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/bite.wav"&gt;
      bite.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbite.mat"&gt;
        StrObjbite.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/boat.wav"&gt;
      boat.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjboat.mat"&gt;
        StrObjboat.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/boot.wav"&gt;
      boot.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjboot.mat"&gt;
        StrObjboot.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/bout.wav"&gt;
      bout.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbout.mat"&gt;
        StrObjbout.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/burt.wav"&gt;
      burt.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjburt.mat"&gt;
        StrObjburt.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/but.wav"&gt;
      but.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjbut.mat"&gt;
        StrObjbut.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   The temporal structure for creating a continuum follows that in the
   &lt;a class="reference external" href="#morphing"&gt;
    morphing tutorial
   &lt;/a&gt;
   .
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Temporal anchors" src="https://memcauliffe.com/images/straight_tutorial/vowel_anchors.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   You’ll notice that the region corresponding to the vowel in each sound files
shows a fair bit of difference, indicative of their different formant structure.
Rather than mixing the sound files directly, we’d like to shift the formants around,
so we have to align the formant peaks during the vowel as below.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Frequency anchors" src="https://memcauliffe.com/images/straight_tutorial/vowel_frequency_anchors.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   The continuum created for the “bit” and “bat” endpoints using morphing substrates of
   &lt;a class="reference external" href="https://memcauliffe.com/mat/bit-bat_A.mat"&gt;
    bit-bat_A.mat
   &lt;/a&gt;
   to
   &lt;a class="reference external" href="https://memcauliffe.com/mat/bit-bat_B.mat"&gt;
    bit-bat_B
   &lt;/a&gt;
   is below.
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       1
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat001.wav"&gt;
        bit-bat001.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       2
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat002.wav"&gt;
        bit-bat002.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       3
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat003.wav"&gt;
        bit-bat003.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       4
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat004.wav"&gt;
        bit-bat004.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       5
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat005.wav"&gt;
        bit-bat005.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       6
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat006.wav"&gt;
        bit-bat006.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       7
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat007.wav"&gt;
        bit-bat007.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       8
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat008.wav"&gt;
        bit-bat008.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       9
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat009.wav"&gt;
        bit-bat009.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       10
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat010.wav"&gt;
        bit-bat010.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       11
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bit-bat011.wav"&gt;
        bit-bat011.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;p&gt;
   Listen specifically to steps 6 and 7 to hear something approximately “bet”-like, as the continuum goes through the /ɛ/ formant region.
  &lt;/p&gt;
  &lt;p&gt;
   In contrast, a continuum created without frequency anchoring sounds using morphing substrates of
   &lt;a class="reference external" href="https://memcauliffe.com/mat/bit-bat_nofreqeuencyalignment_A.mat"&gt;
    bit-bat_nofreqeuencyalignment_A.mat
   &lt;/a&gt;
   to
   &lt;a class="reference external" href="https://memcauliffe.com/mat/bit-bat_nofreqeuencyalignment_B.mat"&gt;
    bit-bat_B
   &lt;/a&gt;
   is below.
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       1
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat001.wav"&gt;
        bad_bit-bat001.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       2
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat002.wav"&gt;
        bad_bit-bat002.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       3
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat003.wav"&gt;
        bad_bit-bat003.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       4
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat004.wav"&gt;
        bad_bit-bat004.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       5
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat005.wav"&gt;
        bad_bit-bat005.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       6
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat006.wav"&gt;
        bad_bit-bat006.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       7
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat007.wav"&gt;
        bad_bit-bat007.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       8
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat008.wav"&gt;
        bad_bit-bat008.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       9
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat009.wav"&gt;
        bad_bit-bat009.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       10
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat010.wav"&gt;
        bad_bit-bat010.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       11
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/bad_bit-bat011.wav"&gt;
        bad_bit-bat011.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;p&gt;
   The boundary between the two is much more abrupt and the synthesis quality is generally not as good.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="synthesizing-an-intonation-continuum"&gt;
  &lt;h2&gt;
   Synthesizing an intonation continuum
   &lt;a class="headerlink" href="#synthesizing-an-intonation-continuum" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   This example uses the following sound files:
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/homework_s.wav"&gt;
      homework_s.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjhomework_s.mat"&gt;
        StrObjhomework_s.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       “My dog ate my homework.” (declarative intonation)
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/homework_q.wav"&gt;
      homework_q.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjhomework_q.mat"&gt;
        StrObjhomework_q.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       “My dog ate my homework?” (yes-no question intonation)
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   The temporal structure for creating a continuum follows that in the
   &lt;a class="reference external" href="#morphing"&gt;
    morphing tutorial
   &lt;/a&gt;
   .
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Temporal anchors" src="https://memcauliffe.com/images/straight_tutorial/intonation_anchors.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   There’s a fair bit of spectral difference in the final word (“homework”)
which is to be expected given that I tend to use creaky voice more at the end of the
sentence, so it might be worthwhile re-recording this pair.  However, the continuum
generally sounds pretty good to me.
  &lt;/p&gt;
  &lt;p&gt;
   The continuum created for the “homework_s” and “homework_q” endpoints using morphing substrates of
   &lt;a class="reference external" href="https://memcauliffe.com/mat/s-q_homework_A.mat"&gt;
    s-q_homework_A.mat
   &lt;/a&gt;
   to
   &lt;a class="reference external" href="https://memcauliffe.com/mat/s-q_homework_B.mat"&gt;
    s-q_homework_B
   &lt;/a&gt;
   is below.
  &lt;/p&gt;
  &lt;table class="docutils align-default"&gt;
   &lt;thead&gt;
    &lt;tr class="row-odd"&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       Step
      &lt;/p&gt;
     &lt;/th&gt;
     &lt;th class="head text-center"&gt;
      &lt;p&gt;
       File
      &lt;/p&gt;
     &lt;/th&gt;
    &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       1
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework001.wav"&gt;
        s-q_homework001.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       2
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework002.wav"&gt;
        s-q_homework002.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       3
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework003.wav"&gt;
        s-q_homework003.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       4
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework004.wav"&gt;
        s-q_homework004.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       5
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework005.wav"&gt;
        s-q_homework005.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       6
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework006.wav"&gt;
        s-q_homework006.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-even"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       7
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework007.wav"&gt;
        s-q_homework007.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       8
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework008.wav"&gt;
        s-q_homework008.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       9
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework009.wav"&gt;
        s-q_homework009.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="row-odd"&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       10
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework010.wav"&gt;
        s-q_homework010.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       11
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/s-q_homework011.wav"&gt;
        s-q_homework011.wav
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
     &lt;td class="text-center"&gt;
      &lt;p&gt;
      &lt;/p&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
 &lt;/section&gt;
 &lt;section id="pitch-manipulation"&gt;
  &lt;h2&gt;
   Pitch manipulation
   &lt;a class="headerlink" href="#pitch-manipulation" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   This example uses the following sound file:
  &lt;/p&gt;
  &lt;ul class="simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     &lt;a class="reference external" href="https://memcauliffe.com/wav/homework_q.wav"&gt;
      homework_q.wav
     &lt;/a&gt;
    &lt;/p&gt;
    &lt;ul&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/mat/StrObjhomework_q.mat"&gt;
        StrObjhomework_q.mat
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       “My dog ate my homework?” (yes-no question intonation)
      &lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       &lt;a class="reference external" href="https://memcauliffe.com/wav/homework_q_manipulation.wav"&gt;
        Resynthesized version
       &lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
  &lt;p&gt;
   The resynthesized version is the result of drawing the downward trending line
from the
   &lt;a class="reference external" href="#manipulation"&gt;
    manipulation page
   &lt;/a&gt;
   .
  &lt;/p&gt;
  &lt;p&gt;
   The original pitch curve is shown below.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="Initial dialog state" src="https://memcauliffe.com/images/straight_tutorial/manipulation_begin.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;p&gt;
   By drawing a line going down over the course of the sentence, we can change
the question intontation into a (slightly unnatural sounding) declarative
intonation.
  &lt;/p&gt;
  &lt;p&gt;
   &lt;img alt="New pitch contour" src="https://memcauliffe.com/images/straight_tutorial/manipulation_new_contour.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="interface-controls"&gt;
 &lt;h1&gt;
  Interface controls
  &lt;a class="headerlink" href="#interface-controls" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  This section contains information on the less obvious ways over interacting
with the various dialogs that STRAIGHT uses.
 &lt;/p&gt;
&lt;/section&gt;



&lt;section id="f0-extraction-interface-controls"&gt;
 &lt;h1&gt;
  F0 extraction interface controls
  &lt;a class="headerlink" href="#f0-extraction-interface-controls" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;p&gt;
  &lt;img alt="F0 extraction interface" src="https://memcauliffe.com/images/straight_tutorial/f0_interface.png"/&gt;
  {: .center-image }
 &lt;/p&gt;
 &lt;ol class="arabic simple"&gt;
  &lt;li&gt;
   &lt;p&gt;
    Click on the time axis to zoom in
   &lt;/p&gt;
   &lt;ul class="simple"&gt;
    &lt;li&gt;
     &lt;p&gt;
      Hold shift and click to zoom out
     &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;p&gt;
      Click and drag to move the visible part of the waveform
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Click and drag a boundary to extend/reduce a voiced portion
   &lt;/p&gt;
   &lt;ul class="simple"&gt;
    &lt;li&gt;
     &lt;p&gt;
      Moving a boundary over another voiced portion will overwrite it,
which can help with deleting lots of small voiced portions
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
   &lt;p&gt;
    Click and drag a point to mark a frame as either unvoiced or voiced
   &lt;/p&gt;
   &lt;ul class="simple"&gt;
    &lt;li&gt;
     &lt;p&gt;
      Drag to the center to mark as unvoiced
     &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
     &lt;p&gt;
      Drag to top or bottom to mark as voiced
     &lt;/p&gt;
    &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/li&gt;
 &lt;/ol&gt;
 &lt;section id="anchoring-interface-controls"&gt;
  &lt;h2&gt;
   Anchoring interface controls
   &lt;a class="headerlink" href="#anchoring-interface-controls" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   &lt;img alt="Anchoring interface" src="https://memcauliffe.com/images/straight_tutorial/anchoring_interface.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;ol class="arabic simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     Click on the time axis of either sound file to zoom in
    &lt;/p&gt;
    &lt;ul class="simple"&gt;
     &lt;li&gt;
      &lt;p&gt;
       Hold shift and click on the time axis of either to zoom out
      &lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       When zoomed in, you can click and drag the spectrograms, waveforms or
distance matrix to move the visible areas
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Click on the white alignment line across the distance matrix to add a new anchor
    &lt;/p&gt;
    &lt;ul class="simple"&gt;
     &lt;li&gt;
      &lt;p&gt;
       Mouse cursor will change to have a plus
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Click and drag on an anchor to move it around (you can also click and drag the lines in the spectrogram view)
    &lt;/p&gt;
    &lt;ul class="simple"&gt;
     &lt;li&gt;
      &lt;p&gt;
       Hold shift and click to remove an anchor
      &lt;/p&gt;
      &lt;ul&gt;
       &lt;li&gt;
        &lt;p&gt;
         Mouse cursor will change to an eraser
        &lt;/p&gt;
       &lt;/li&gt;
      &lt;/ul&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       Hold alt and click to bring up the frequency anchor interface
      &lt;/p&gt;
      &lt;ul&gt;
       &lt;li&gt;
        &lt;p&gt;
         Mouse cursor will change to a pointing hand
        &lt;/p&gt;
       &lt;/li&gt;
      &lt;/ul&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ol&gt;
 &lt;/section&gt;
 &lt;section id="frequency-anchor-interface-controls"&gt;
  &lt;h2&gt;
   Frequency anchor interface controls
   &lt;a class="headerlink" href="#frequency-anchor-interface-controls" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   &lt;img alt="Frequency anchoring interface" src="https://memcauliffe.com/images/straight_tutorial/frequency_anchor_interface.png"/&gt;
   {: .center-image }
  &lt;/p&gt;
  &lt;ol class="arabic simple"&gt;
   &lt;li&gt;
    &lt;p&gt;
     Click on the frequency axis to zoom in
    &lt;/p&gt;
    &lt;ul class="simple"&gt;
     &lt;li&gt;
      &lt;p&gt;
       Hold shift and click to zoom out
      &lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       Click and drag the white background to move the visible part of the spectrum
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Click on either frequency spectrum to add an anchor
    &lt;/p&gt;
    &lt;ul class="simple"&gt;
     &lt;li&gt;
      &lt;p&gt;
       Mouse cursor will change to have a plus
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;p&gt;
     Click and drag on the dots to change what parts of the spectrum are aligned
    &lt;/p&gt;
    &lt;ul class="simple"&gt;
     &lt;li&gt;
      &lt;p&gt;
       Hold shift and click to remove an anchor
      &lt;/p&gt;
      &lt;ul&gt;
       &lt;li&gt;
        &lt;p&gt;
         Mouse cursor will change to an eraser
        &lt;/p&gt;
       &lt;/li&gt;
      &lt;/ul&gt;
     &lt;/li&gt;
     &lt;li&gt;
      &lt;p&gt;
       Graphical elements can interfere with one another, so you may have to
move something out of the way first
      &lt;/p&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ol&gt;
 &lt;/section&gt;
&lt;/section&gt;



&lt;section id="troubleshooting-straight"&gt;
 &lt;h1&gt;
  Troubleshooting STRAIGHT
  &lt;a class="headerlink" href="#troubleshooting-straight" title="Link to this heading"&gt;
   ¶
  &lt;/a&gt;
 &lt;/h1&gt;
 &lt;section id="recording-quality"&gt;
  &lt;h2&gt;
   Recording quality
   &lt;a class="headerlink" href="#recording-quality" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The source end points should be recorded in as high a quality as possible
with a high SNR.  STRAIGHT scales the amplitudes, so if your stimuli were
recorded with a lower gain, some noise might be introduced from the microphone,
leading to artifacts in the eventual synthesis.
  &lt;/p&gt;
  &lt;p&gt;
   Additionally, the recording environment should not have noise in the background.
STRAIGHT can remove some low frequency hums, but any noise in the frequency
range of speech is going to be analyzed as speech and resynthesized.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="pronunciations"&gt;
  &lt;h2&gt;
   Pronunciations
   &lt;a class="headerlink" href="#pronunciations" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   The two end points that you’re generating a continuum for should be maximally
similar, except in the one way you want the continuum along.  So for a continuum
from “bet” to “bat”, the /b/ and /t/ should be pronounced as identically
as possible.  In English, /b/ can be realized (albeit uncommonly) with
prevoicing, and coda /t/ can be realized in a variety of different ways:
released, unreleased, glottalized released, or glottal stop. If the two end
points have different realizations, generating a continuum is much trickier
(you can look at using
   &lt;a class="reference external" href="https://memcauliffe.com/wav/bet_creaky.wav"&gt;
    bet_creaky.wav
   &lt;/a&gt;
   and
   &lt;a class="reference external" href="https://memcauliffe.com/wav/bat.wav"&gt;
    bat.wav
   &lt;/a&gt;
   as the end points).  In this case, I would
recommend re-recording the end points to be more similar. Side-by-side
productions can be used to elicit more similar pronunciations, as well as coaching
the speaker about releasing all stops, for instance.
  &lt;/p&gt;
  &lt;p&gt;
   I would also recommend consistent modal voice quality, since pitch tracking
is generally easier.
  &lt;/p&gt;
 &lt;/section&gt;
 &lt;section id="random-error-in-generating-continua"&gt;
  &lt;h2&gt;
   Random error in generating continua
   &lt;a class="headerlink" href="#random-error-in-generating-continua" title="Link to this heading"&gt;
    ¶
   &lt;/a&gt;
  &lt;/h2&gt;
  &lt;p&gt;
   I’ve run into a random error that sometimes pops up on some versions of the
Matlab code, where it will give a message about different dimensions of matrices.
The fastest solution I’ve found is to redo the anchoring completely, and then
run the continuum again and it should work. I think this is only relevant to
the batch script that I’ve wrote
   &lt;a class="reference external" href="https://github.com/SpeechInContext/linguistic-analysis-resources/blob/master/continua/morphing/morph_continua.m"&gt;
    here
   &lt;/a&gt;
   ,
I don’t think I’ve encountered the bug in the standalone versions.
  &lt;/p&gt;
 &lt;/section&gt;
&lt;/section&gt;</content><category term="Blog"></category><category term="workshop"></category><category term="tutorial"></category><category term="straight"></category></entry></feed>