deep throat
introduction
Deep throat is a Python program that can generate 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 WAVE 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.
setup
sudo apt-get -y install libasound-dev
sudo apt-get -y install portaudio
sudo apt-get install python-pyaudio
sudo apt-get install python3-pyaudio
#sudo pip install pyaudio
phonemes
There are data for 36 phonemes defined in deep throat:
phonemes |
|---|
space |
A |
B |
D |
F |
G |
H |
J |
K |
L |
M |
N |
P |
R |
S |
T |
U |
V |
W |
Y |
Z |
AE |
AH |
AW |
CH |
EE |
EH |
IH |
OH |
OO |
SH |
TZ |
TH |
UH |
WH |
ZH |
letter-to-sound rules
Deep throat letter-to-sound rules rules are defined in strings in a form easy for humans to read and write. Rules have the form A/B/C/D. The character string, occurring with left context A and right context C, gets the pronunciation D. 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"
visual and sound analyses
The 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.
usage examples
command |
comment |
|---|---|
deep_throat.py -- help |
help with options and arguments |
deep_throat.py --text="hello world" |
speak specified text |
deep_throat.py --timeloop |
speak time in a loop |
deep_throat.py --infile="text.txt" |
speak input text file |
deep_throat.py --text="hello world" --savetowave file --outfile="test.wav" |
save text to WAVE file |
echo "test" | deep_throat.py |
speak pipe text |
deep_throat.py --interactive |
engage interactive mode |
deep_throat.py --analysisvisual |
engage visual analysis mode |
deep_throat.py --analysissound |
engage sound analysis mode |
future
Under consideration is phonemes data of higher resolution and system checks (such as PortAudio checks).
references
H. 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)
Metadata
Release files for deep-throat 2016.11.25.50
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deep_throat-2016.11.25.50.tar.gz | 46.4 kB | Details |
Release files / deep_throat-2016.11.25.50.tar.gz
| Download URL | deep_throat-2016.11.25.50.tar.gz |
|---|---|
| Size | 46.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
514dab6bb24878b52ffe3b4cc081830603d2537a88fa20d55da62ade8a8a181c
|
|
BLAKE2b-256 checksum How to use checksums |
b437bf1f1477285c8217695945102d2c4f5c1638283bf5029b5e151810c0a85b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |