Describe the solution you'd like
Guano is a metadata convention used by the bat acoustics community
see spec https://github.com/riggsd/guano-spec/blob/master/guano_specification.md
and python package https://pypi.org/project/guano/
It has a nice set of values in the defaults, and allows "namespaces" with custom sets of fields as well.
Implementation-wise, it writes a separate section of WAV file (only wav is supported) similar to the default header, but it can be at the end for some reason. However, it seems it also supports I/O of text files and other formats.