The Festival Speech Synthesis System offers a general framework for building speech synthesis systems. As a whole it offers full text to speech through a number APIs: from shell level, though a Scheme command interpreter, as a C++ library, from Java, and an Emacs interface. Festival is multi-lingual, but does not support as much languages as eSpeak NG.
It also supports Singing Synthesis using a custom XML format.
Flinger is a program for synthesizing singing voice from a MIDI file input. It is based on the Festival Speech Synthesis System and currently unmaintained. It has been used my some producers long time befrore Vocaloid and UTAU were released: see Wispher and Jukebox
It comes with source code but is not free software.