https://github.com/celphase/duck-pond/blob/main/src/synth.rs
To the credit of the author there is also an attribution file which describes a process of deriving the models from recordings (none of the techniques are very novel, but it's fairly impressive to see automated -- edit: I assume the project is LLM-generated) https://github.com/celphase/duck-pond/blob/main/ATTRIBUTION....
Honestly I can't take credit for any major input on it other than a few technical choices. Audio is entirely outside my wheelhouse beyond what happens at the platform API level.
The process involved running the LLM in a loop to gradually correct parameters of a synthesis stack to have the spectrogram of the output match the spectrogram of a real recorded sample. One funny part is where the synthesis was marked by a classification model as more duck than the real duck sample.