Singing voice synthesizer using LPC for classic robot-sounding singing
README.md
# Savvas A small LPC singing-voice synthesizer. Uses a source-filter model, Rosenberg glottal pulse train/band-limited noise driving LPC. This implementation is a test to see how closely this style of LPC voice synthesis matches the [Teenage Engineering Choir](https://www.youtube.com/watch?v=3Pcp0au-IBY) for later use in a project with the same algorithm running on an ESP32. ## Vowels and melody ``` cargo run --release -- sing --melody "A4:0.45:a C5:0.45:e E5:0.9:i" --out demo.wav cargo run --release -- sing --voice take.wav --melody "C4:0.6:o E4:0.6:o G4:0.9:o" --out out.wav ``` Melody notes are `NOTE:DUR[:VOWEL]`; `r:DUR` is a rest, `#`/`b` for accidentals. ## Consonants and text `--phonemes` takes explicit X-SAMPA phones; `--text` runs a crude English letter-to-sound front end. Both split into syllables and take one melody note per syllable; without `--melody` the syllables get a plain chant. ``` cargo run --release -- sing --text "hello world" --out hello.wav cargo run --release -- phonemes --text "the quick brown fox" cargo run --release -- sing --phonemes "h V l oU | w 3: l d" --melody "A3:0.5 A3:0.4 E3:0.9" --out out.wav ``` ## Pieces `song` renders a score file, which is made of tracks with explicitly defined musical parts. A vocal track entry is `TIME NOTE DUR PHONES` (phones dash separated), and a piano track entry is `TIME NOTES DUR AMP` where `NOTES` is a chord joined by `+`. A vocal track header can cast a singer: `preset=bass|baritone|tenor|alto|mezzo|soprano|child` sets the whole vocal quality, and individual settings (`formant=`, `cluster=`, `tilt=`, `vibrato=`, `vibrato_rate=`, `glide=`, `breath=`) override it. The singer's formant cluster moves with the tract length, so a bass and a soprano differ above 2 kHz as well as below; `cluster=` scales it further. Score-level lines `reverb <0..1>` and `humanize <ms>` set the wet mix and the timing drift, so a piece renders the same way without flags; the command line overrides them. ``` cargo run --release -- song --file songs/daisy.song --ou…