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 to MPEG-4 compressed audio.
We have found one software suitable in our database for this conversion.
Apple macOS / Mac OS X software - convert txt to m4a on OS X
Narrator is text-to-speech solution for the Mac. Just paste your text into the window or import an RTF, .txt or .doc file into Narrator and your letter, story – any text – is brought to life using voice synthesis.
Convert from txt file
to m4a file
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.