LinuxCommandLibrary

spd-say

Speak text using speech dispatcher

SYNOPSIS

spd-say [OPTIONS] [TEXT...]

PARAMETERS

TEXT...
    The text string(s) to be spoken aloud. If multiple strings are provided, they are concatenated with spaces.

-w, --wait
    Wait for the speech to finish before the command exits.

-o FILE, --output-file=FILE
    Save the spoken output to a WAV file instead of playing it through the audio device.

-r RATE, --rate=RATE
    Set the speech rate. Value typically ranges from -100 to 100, where 0 is the default.

-p PITCH, --pitch=PITCH
    Set the speech pitch. Value typically ranges from -100 to 100, where 0 is the default.

-v VOLUME, --volume=VOLUME
    Set the speech volume. Value typically ranges from -100 to 100, where 0 is the default.

-l LANG, --language=LANG
    Set the language for speech synthesis (e.g., 'en', 'es', 'fr').

-g GENDER, --gender=GENDER
    Set the preferred gender for the voice (e.g., 'male', 'female', 'neutral').

--voice=VOICE_NAME
    Specify a particular voice name to use (e.g., 'en_US-male-basic'). Use --list-voices to see available voices.

--list-voices
    List all available voices configured in Speech Dispatcher.

DESCRIPTION

spd-say is a command-line utility for converting text into speech using the Speech Dispatcher framework. It acts as a client to the Speech Dispatcher daemon, allowing users to easily read out loud any text provided as an argument or from standard input.

This command provides a unified interface to various underlying speech synthesizers installed on the system, such as eSpeak NG or Festival. It's particularly useful for quick audio feedback, accessibility scripts, or integrating text-to-speech capabilities into shell scripts. Its simplicity makes it a popular choice for basic text-to-speech needs on Linux.

CAVEATS

The spd-say command relies on the Speech Dispatcher daemon (speechd) being active and running in the background. If the daemon is not running, the command will likely fail or produce no output.

The quality and availability of voices and languages depend entirely on the underlying speech synthesizers installed and configured with Speech Dispatcher (e.g., eSpeak NG, Festival, etc.). Users might need to install additional speech synthesizer packages for specific languages or higher quality output.

UNDERLYING SYNTHESIZERS

spd-say itself does not perform speech synthesis. Instead, it sends text to the Speech Dispatcher daemon, which then forwards it to one of the installed speech synthesizers (like eSpeak NG, Festival, etc.) that are configured as modules.
The quality and characteristics of the voice you hear are determined by these backend synthesizers.

SPEECH DISPATCHER DAEMON (SPEECHD)

For spd-say to function, the Speech Dispatcher daemon (speechd) must be running. This daemon manages speech requests, handles different clients, and communicates with the actual speech synthesis engines.
In many modern Linux distributions, it starts automatically as a system service or user service.

HISTORY

spd-say is an integral part of the Speech Dispatcher project, which was initiated to provide a high-level, unified interface for speech synthesis on Unix-like operating systems. Developed by Peter Vágner and others, Speech Dispatcher aims to abstract away the complexities and differences between various speech synthesizers.

spd-say emerged as the primary command-line client for this system, allowing users to easily interact with the speech services without needing to know the specifics of the backend synthesizer. Its development is ongoing, focusing on broader compatibility and improved accessibility.

SEE ALSO

espeak-ng(1), festival(1), aplay(1), speech-dispatcher(7)

Copied to clipboard