I recently wanted to train some acoustic models using the Switchboard corpus of conversational telephone speech, and I wanted the model names to be compatible with models that I had trained on a different corpus using the CMU pronouncing dictionary. The phone sets of the Switchboard dictionary and the CMU dictionary are very similar, but there are three differences that need to be fixed before they are completely compatible.
First, the Switchboard pronouncing dictionary can be downloaded here (along with the transcriptions). The filename of the dictionary in this release is sw-ms98-dict.text. Then, the CMU pronouncing dictionary can be downloaded here. For my purposes, I am disregarding the lexical stress information provided by the CMU dictionary, so I have removed all of the ’0′, ’1′, and ’2′ labels following the vowels.
If you compare the phones in the two dictionary files, you will see that the following three phones are present in the Switchboard dictionary, but absent in the CMU dictionary: ax, el, and en. To convert the Switchboard dictionary transcriptions to match the CMU phone set, ax should be changed to AH, el should be changed to AH L, and en should be changed to AH N.
Here is a simple sed script that I wrote to apply these changes to the Switchboard dictionary file sw-ms98-dict.text (in addition to removing comments and empty lines):
$ sed '1 d' sw-ms98-dict.text \
| sed '/^#/ d' \
| sed '/^$/ d' \
| sed 's/ ax/ ah/g' \
| sed 's/ en/ ah n/g' \
| sed 's/ al/ ah l/g' \
| sed 's/ .*/\U&\E/'
Note that this sed script requires GNU sed in order to use the last command to change the replacement text to upper case.