Package: deep_throat
deep throatcreditsname by Liam MooreintroductionDeep throat is a Python program that can synthesize speech. A simple
approach to unrestricted text-to-speech translation uses a small set of
letter-to-sound rules, each rule specifying a pronunciation for one or
more letters in some context. Deep throat features a small set of
letter-to-sound rules that translate English text to phonemes producing
usably accurate pronunciations of words. Deep throat can produce sounds
by combining stored representations of phoneme sounds in accordance with
generated phoneme translations. It can output these sounds to computer
sound hardware using PortAudio and it can save them to sound file.Deep throat can accept text as a command line option argument, from a
pipe and it can be set into an interactive mode.Deep throat can be set to read the date and time in various ways, such
as in a loop. It can translate text to phonemes, it can translate
specified phonemes to sounds and it can translate numbers to English
text. It can engage visual and sound analyses.setupsudoapt-get-yinstalllibasound-devsudoapt-get-yinstallportaudiosudoapt-getinstallpython-pyaudiosudoapt-getinstallpython3-pyaudiosudopipinstalldeep_throatsudopython-mnltk.downloaderallphonemesThere are data for 36 phonemes defined in deep throat:phonemesspaceABDFGHJKLMNPRSTUVWYZAEAHAWCHEEEHIHOHOOSHTZTHUHWHZHletter-to-sound rulesDeep throat letter-to-sound rules rules are defined in strings in a form
easy for humans to read and write. Rules have the formA/B/C/D: the
character string occurring with left contextAand right contextCgets the pronunciationD. Some simple example rules are as
follows:ARE/ / /AH-R
FIRST/ //F-U-R-S-T
COMPUTER/ //K-AH-M-P-Y-OO-T-OH-R
SHITFACED/ //S-H-IH-T-F-A-S-D"usage examplescommandcommentdeep_throat.py--helphelp with options and
argumentsdeep_throat.py--text="helloworld"speak specified textdeep_throat.py--timeloopspeak time in a loopdeep_throat.py--infile="text.txt"speak input text filedeep_throat.py--text="helloworld"--savetowavefile--outfile="test.wav"save text to WAVE
fileecho "test" | deep_throat.pyspeak pipe textdeep_throat.py--interactiveengage interactive
modedeep_throat.py--analysisvisualengage visual
analysis modedeep_throat.py--analysissoundengage sound analysis
modevisual and sound analysesThe visual analysis mode saves histograms of all of the phonemes, saves
multigraph comparisons of phonemes of different resolutions and saves
graph comparisons of phonemes data and fast Fourier transform
synthesized phonemes data. The sound analysis mode speaks the 50 most
frequent Brown Corpus words.futureUnder consideration is improvement of rules interpretations, phonemes
data of higher resolution, improvements in efficiency, and system checks
(such as PortAudio checks).referencesH. S. Elovitz, R. W. Johnson, A. McHugh and J. E. Shore, Automatic
Translation of English Text to Phonetics by Means of Letter-to-Sound
Rules, Naval Research Laboratory Report 7948 (21 January 1976)H. S. Elovitz, R. Johnson, A. McHugh and J. Shore, Letter-to-Sound
Rules for Automatic Translation of English Text to Phonetics, IEEE
Transactions on Acoustics, Speech, and Signal Processing, Volume.
ASSP-24, Number 6 (December 1976)