Why is text2wav not working in phpagi demo

I’m just trying to run demo in PHPAGI folder available here: https://sourceforge.net/projects/phpagi/files/phpagi/2.20/

However, the text2wav is not working. When the script has to run text2wav (in dtmf.php for example), this error show:

ast_openstream_full: File /var/spool/asterisk//tmp//text2wav_f87b365372c500c76e497087ac7e470a does not exist in any format

I tried a lot of things: giving permission for every file, trying to understang text2wav source code (https://phpagi.sourceforge.net/phpagi22/api-docs/__filesource/fsource_phpAGI__phpagi.php.html#a1331), I put the max verbosity in asterisk console and activated agi debug on but still can’t understnand what’s happening. the fact is, the file in /var/spool/asterisk//tmp//text2wav_f87b365372c500c76e497087ac7e470a do exist in txt format but not in wav