An interactive command-line formant speech synthesizer (Klatt-style cascade/parallel synthesis, Sensimetrics Sensyn v2.2 engine, updated to v2.5 by Anthony C. Bartman) with Dennis Klatt's LSpecto speech analysis software from 1988 included. LSpecto can be used in conjunction with SenSyn for Analysis-Synthesis and Copy-Synthesis purposes.
makeBuilds both sensyn and lspecto into build/, along with a copy of default60.con (both tools look for it in their own directory). Run make sensyn or make lspecto to build just one.
On plain Windows (cmd.exe, no cp/mkdir -p/rm -rf on PATH), use build.bat instead — it does the same thing with only Windows built-ins:
build.batbuild.bat sensyn, build.bat lspecto, and build.bat clean work the same way as their make equivalents.
Requires gcc (or edit CC in the root Makefile/build.bat for another compiler). By default CFLAGS targets little-endian platforms (-DSENS_LITTLE_ENDIAN); switch to -DSENS_BIG_ENDIAN for big-endian systems.
The a (play) command uses winmm and only works on Windows; on other platforms drop -lwinmm from SENSYN_LIBS in the Makefile (keep playwave.o — its non-Windows stub just prints a "not supported" message instead of playing).
cd build
./sensynRun from build/ so the program can find default60.con (the default parameter set) on startup. Optional arguments:
| Arg | Effect |
|---|---|
-n |
Novice mode (verbose prompts) |
-vt100 |
VT100 terminal (default) |
-vt125 |
VT125 terminal (graphics) |
-p |
Synthesize and play name.doc to the speaker, then quit (needs name) |
-b |
Synthesize name.doc, save wav+doc output, then quit (needs name) |
-espsin |
Read name as an ESPS FEA parameter file instead of .doc |
-espsout |
Save the synthesized waveform as an ESPS FEA_SD file instead of .wav |
name |
Load an existing name.doc file instead of the defaults |
For example, ./sensyn -p myfile plays myfile.doc and exits, without entering the interactive menu. name may be given with or without a trailing .doc.
-espsin/-espsout interoperate with the ESPS/xwaves speech-analysis ecosystem, using a vendored copy of ESPS's own file-I/O library (see src/esps/README.md) — no external ESPS installation needed. -espsin name reads name (whatever its extension) as an ESPS FEA control file, mapping fields named fm/f0/bw/nas/trach/asp/voice/fric/delta (the layout documented for the original ESPS-ecosystem "susynt" port of this synthesizer) onto SenSyn's own parameters; any field can be missing, most commonly leaving just fm+f0 (e.g. a formant tracker's output). -espsout saves the synthesized waveform as name.sd (ESPS FEA_SD, native to ESPS/xwaves tools) instead of name.wav, with the same auto-scaling. Both combine with -b/-p for non-interactive use, e.g. ./sensyn -b -espsin -espsout tracked_formants.
| Key | Action |
|---|---|
p |
Print current parameter values |
c |
Change a parameter's default value |
e |
Enter time-varying parameter values |
a |
Synthesize and play the current parameters through the speaker (no file, no quit) |
s |
Synthesize the waveform, save output, quit |
S |
Save current parameters (no synthesis), quit |
q |
Quit without saving |
? |
Help |
Synthesizing (s) prompts for an output name and writes two files: <name>.wav (mono 16-bit PCM audio, auto-scaled to fill the dynamic range) and <name>.doc (a report of the synthesis configuration and any time-varying parameters).
lspecto analyzes a recorded speech waveform — pitch tracking, LPC formant tracking, spectrograms — and can turn it into a .doc file SenSyn understands, so you can resynthesize or play back an analysis of real speech.
cd build
./lspecto name -synReads name.wav (standard RIFF/WAVE, mono 16-bit — exactly what sensyn's s command writes) and writes name.doc, using default60.con (the same file sensyn uses for its own defaults) as the parameter template. Load the result with sensyn -p name or sensyn name. Run ./lspecto ? for the full argument list (formant/f0 plotting modes, female-voice analysis with -synf, etc.) — these also write a PostScript .ps* plot file as a side effect, unchanged from upstream.
In the default mode (no -f0/-pf/-syn), ./lspecto name -png (or -bmp, -jpg; any combination) also saves the pseudo-spectrogram as name.png/.bmp/.jpg — a real grayscale image, not a rasterized PostScript page — via the vendored stb_image_write.h. Images are landscape (time left-to-right, frequency increasing upward).
src/— sources for bothsensyn(the synthesizer engine and CLI driver) andlspecto(waveform analysis: pitch/formant tracking, spectrograms, SenSyn-compatible.docoutput), plusdefault60.con, the shared default parameter file both tools readsrc/esps/— vendored ESPS file-I/O library backingsensyn's-espsin/-espsout(see its own README);lspectodoesn't use itdocs/— parameter reference and original SenSyn documentation (PDF)Makefile/build.bat— two ways to build the same thing; use whichever fits your shell (see Build, above)