# Speak to file

An action block that speaks a message using text-to-speech (TTS) to an audio file.

The fiber will pause until the audio file has been saved.

Use the Speak block for direct audio playback.

The path can be set to an existing or new file, or to a directory where the file will be placed with an automatic name. The path to the actual WAV audio file generated is assigned to the audio file variable.

## Input arguments

- Message — message to speak.
- Rate — rate (speed) of speech, default is 100%.
- Language — language of the message, default is the device language.
- Engine — TTS engine to use, default is the built-in engine.
- Offline — whether to prevent network requests and only use on-device synthesis, if supported by engine.
- Path — file or directory path where the audio file will be saved, default is a WAV file in the “Notifications” directory.

## Output variables

- Audio file — variable to assign the path to the WAV audio file.