I want to convert text in file a.txt to sound & play it using APLAY. any suggestions please?
You can use Festival.
text2wave myfile.txt | aplay
It is widely available in distributions and provides different voices.
espeak can read aloud in several languages. English is default, but you can use the option
-v sv for Swedish and corresponding voices for other languages. See
man espeak for more details. For example, change the speed, if you think
espeak speaks too fast.
You can install
espeak from the repository Universe,
sudo apt install espeak
and it can read from a string, a file or from standard input (you can pipe into it), for example
espeak 'Hello World' espeak < /etc/hostname date '+It is %H %m'| espeak
So it should work for you to run
espeak < a.txt
See also this link.