There do exist special text-to-speech synthesizers (such as Narrator) that allows users to create an audio file with a speech from a saved text (for example .txt), but they are usually pretty expensive and in most cases also need manual tweaking during the process because otherwise the audio would not b perfect. But there doesn't seem to be any simple txt to m4a converter available.
Convert Simple text file to MPEG-4 compressed audio.
We found one software available in the database for this conversion.
Apple macOS / Mac OS X software - convert txt to m4a on OS X
A text-to-speech software for Mac
Convert from txt file format
The table with program actions contains information about what each program is capable of doing with their files. This may be a good pointer for further searches for certain file conversions and help you find the converter you are looking for if our search result is insufficient for you. However, it is far from perfect and may sometimes show results which are not really usable because of the nature of the software handles the files. So a conversion that appears as possible, just because of matched actions, may in fact not be possible.