klatt-syn
v1.0.6
Published
Klatt formant synthesizer
Downloads
19
Maintainers
Readme
KlattSyn - Klatt Formant Synthesizer
This is a redevelopment of the classic Klatt cascade-parallel formant synthesizer. The program code is written in TypeScript, which is compiled to JavaScript. It can run within a web browser or with Node.
This implementation of a Klatt synthesizer has been developed by Christian d'Heureuse in 2019 and is based on the following documents and source code:
- D.H. Klatt (1980), "Software for a cascade/parallel formant synthesizer" (PDF)
- D.H. & L.C. Klatt (1990), "Analysis, synthesis and perception of voice quality variations among male and female talkers" (PDF)
- Fortran source code published in Klatt (1980), github.com/jh4xsy/klatt80
- klsyn, last known C version developed by D.H. Klatt himself (1983 - 1986) (PDF), github.com/rsprouse/klsyn/tree/master/c
- klatt 3.03, comp.speech C version (1994), re-implementation in C of Klatt's Fortran code by Jon Iles and Nick Ing-Simmons, www.speech.cs.cmu.edu/comp.speech/Section5/Synth/klatt.html
- klatt 3.04, modernized and cleaned up by Reece H. Dunn (2011 - 2015), github.com/rhdunn/klatt
- eSpeak NG Klatt module (2015 - 2018), github.com/espeak-ng/espeak-ng/blob/master/src/libespeak-ng/klatt.c
- Praat KlattGrid module (2008 - 2019), github.com/praat/praat/blob/master/dwtools/KlattGrid.cpp
Online demo: www.source-code.biz/klattSyn NPM package: klatt-syn GUI application: github.com/chdh/klatt-syn-app
A note on amplitudes
The meaning of amplitude parameters has changed in this implementation of the Klatt synthesizer.
Amplitude values in dB are always relative. In this implementation, we use positive dB values to amplify and negative dB values to attenuate a signal. 0 is used to pass a signal unchanged. -99 is used to mute a signal.
The original Klatt synthesizer used dB values in the range 0 to 87 for amplitude parameters. 0 was used to mute a signal. 57 was used to pass a signal unchanged.
Klatt (1980) states: "The amplitudes of the formant peaks generated by the parallel vocal tract model have been constrained such that, if A1 to A5 are all set to 60 dB, the transfer function will approximate that found in the cascade model." This is no longer the case.
The following table can be used to pragmatically map old values to new values for amplitude parameters in dB:
| Old dB | New dB | | ----: | ---: | | 87 | 30 | | 57 | 0 | | 27 | -30 | | 0 | -99 |
In addition, most amplitude parameter values where internally adjusted in the old source code. To find the corresponding new value, An adjustment value must be subtracted.
| Old symbol | Linear factor | Adjustment dB | Parameter | | :--- | ---: | ---: | :--- | | AP | 0.05 | -26.0 | Aspiration amplitude | | AF | 0.25 | -12.0 | Frication amplitude | | AB | 0.05 | -26.0 | Parallel bypass amplitude | | A1 | 0.4 | -8.0 | Parallel formant 1 amplitude (L1) | | A2 | 0.15 | -16.5 | Parallel formant 2 amplitude (L2) | | A3 | 0.06 | -24.4 | Parallel formant 3 amplitude (L3) | | A4 | 0.04 | -28.0 | Parallel formant 4 amplitude (L4) | | A5 | 0.022 | -33.2 | Parallel formant 5 amplitude (L5) | | A6 | 0.03 | -30.5 | Parallel formant 6 amplitude (L6) | | AN | 0.6 | -4.4 | Parallel nasal amplitude |