src/TextToSpeech.php
public function save(string $filename): TextToSpeechInterface
    {
        $result = file_put_contents($filename, $this->getAudioData());

        if ($result === false) {
            throw new RuntimeException("Unable to save the file ({$filename})");
        }

        return $this;
    }
public function save(string $filename): TextToSpeechInterface
    {
        $result = file_put_contents($filename, $this->getAudioData());

        if ($result === false) {
            throw new RuntimeException("Unable to save the file ({$filename})");
        }

        return $this;
    }
public function save ( string $ filename ) : TextToSpeechInterface { $ result = file_put_contents ( $ filename , $ this -> getAudioData ( ) ) ; if ( $ result === false ) { throw new RuntimeException ( "Unable to save the file ({$filename})" ) ; } return $ this ; }
Create an audio file on the filesystem.

@param string $filename The filename to write to

@return $this
Create an audio file on the filesystem .