src/TextToSpeech.php
public function getFile(string $path = null): string
    {
        if ($path === null) {
            $path = sys_get_temp_dir();
        }

        $filename = $path . "/" . $this->generateFilename();

        if (!is_file($filename)) {
            $this->save($filename);
        }

        return $filename;
    }
public function getFile(string $path = null): string
    {
        if ($path === null) {
            $path = sys_get_temp_dir();
        }

        $filename = $path . "/" . $this->generateFilename();

        if (!is_file($filename)) {
            $this->save($filename);
        }

        return $filename;
    }
public function getFile ( string $ path = null ) : string { if ( $ path === null ) { $ path = sys_get_temp_dir ( ) ; } $ filename = $ path . "/" . $ this -> generateFilename ( ) ; if ( ! is_file ( $ filename ) ) { $ this -> save ( $ filename ) ; } return $ filename ; }
Store the audio file on the filesystem.

This function uses caching so if the file already exists
a call to the text-to-speech service is not made.

@param string $path The path to the directory to store the file in

@return string The full path and filename
Store the audio file on the filesystem .